Since yesterday my vscode is trying to hard to update my imports but it ends up failing and puts a a path to a typescript cache.
I'll be glad to help provide useful information but the behavior seems quite random. It happened to me 3 times yesterday. It even gos as far to update require from my webpack files...

I did not change these 173 files.. only one or 2..

I also see a bunch of insider helpers running.. there might be a rogue one in there that does nasty stuff in the background.

Even though it should not try to update imports on file I haven't touched and certainly not on npm dependencies.
Steps to Reproduce:
The first time I did.
import React, { PureComponent } from '../../../../../../../Library/Caches/typescript/2.9/node_modules/@types/react';
Does this issue occur when all extensions are disabled?: Yes/No
It does not happen enough to be able to tell (enough is pretty relative here as 3 times last day)
It happened again after a complete new install no plugins just by renaming a file on my project, it did rename all my imports in the project with "'../../../../../../../Library/Caches/typescript/2.9/node_modules/@types/*"
I disabled auto import renaming for now.
Duplicate of https://github.com/Microsoft/TypeScript/issues/24914
Will add workaround to prevent this on the VS Code side
@mjbvz do you have a good set of verification steps?
This is happening for me since updateImportsOnFileMove with latest public release.
@JacksonKearl
Here is the closest thing to a repo which I know will cause import express from 'express' to become from '../../../../Library/Caches/typescript/2.9/node_modules/@types/express' when you move "http-server" in and out of "modules/server/lib" affecting "types.d.ts" and others under "modules/server".
Keeps happening to me as well, horrible! I'll figure out how to downgrade.
@mjbvz is this expected?
Same behaviour since updating to 1.25.0 in macOS 10.12.6
This is the problem I have encountered.
tsconfig.json
{
"compilerOptions": {
"rootDir": ".",
"outDir": "./dist",
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"baseUrl": ".",
"paths": {
"src/*": ["./src/*"]
},
"sourceMap": true,
"jsx": "preserve",
"experimentalDecorators": true,
"strict": true,
"suppressImplicitAnyIndexErrors": true,
"types": [],
},
"file": [
"./node_modules/vue-router/types/vue.d.ts",
"./node_modules/vuex/types/vue.d.ts",
],
"include": [
"./src/**/*",
],
}


I modified this file and it has nothing to do with them.
.\src\script\notify.ts
Duplicate of Microsoft/TypeScript#24914
Let me know if you see this in VSCode insiders when using TS 3.0
@mjbvz should we add another workaround/do we know why the previous one isn't catching these cases?
yeah this is making me crazy... how do we fix it?
Yeah, this just happened. Updated all my React imports everywhere in my project to
import React from "../../../../Library/Caches/typescript/2.9/node_modules/@types/react/../../Library/Caches/typescript/2.9/node_modules/@types/react";
And my lodash import to
import _ from "../../../../../Library/Caches/typescript/2.9/node_modules/@types/lodash../../../Library/Caches/typescript/2.9/node_modules/@types/lodash";
Had to manually go through and revert the changes. Was a super pain.
Seeing the same issue (I'm not even using typescript. (other than some obvious implicit thing with VSCode)) . Every few minutes, dozens of files (sometimes 100+) show up as opened and changed in VSCode. Most (oddly, not all) have this breaking change on the import statements.
Very frustrating, VSCode just about unusable with this behavior.
This should be fixed in VS Code insiders. You can also upgrade your workspace to use TypeScript 3.0 (or TS 2.9.1) by following these instructions
Most helpful comment
Yeah, this just happened. Updated all my React imports everywhere in my project to
And my lodash import to
Had to manually go through and revert the changes. Was a super pain.