-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ts] Cannot find module
when project rebuild
#22349
Comments
@STayinloves can you please try latest vscode version (1.22.1) and provide exact steps if this repros. In step "3", should i run |
closing for now. please reopen if more information is available. |
Sorry for overlook this timeline. I'm using the latest version( @sheetalkamat for your first question, Yes, you should The More detail: My workspace folder is the whole git project which contains.NET, Python, and Javascript. I think one way can reproduce this error is:
I notice the error always occurred in the subproject I have just made changes to and doesn't happen in the other subprojects. It may because of the pattern file's changes. pic: |
@STayinloves I followed the repro steps you mentioned but wasnt able to reproduce the issue (that is there is no error shown for module resolution). Then when i looked at your initial report, i realised you were trying
Opened
On command prompt
After compilation was complete checked the open ts file and if the issue repros you see error about resolution of |
@sheetalkamat I have updated the typescript version to
|
@mhegazy Please reopen the issue. I'm sorry for previous misjudge, I have updated the comment above. |
…ts change and resolve modules Test case for #22349
…ke setup with path mapping Fixes #22349
@STayinloves I was able to track down the issue and have PR to handle these kind of scenario. Unfortunately handling it with the settings you have, isnt feasible from performance perspective since you have a setup such that your node_modules in the {
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"outDir": "compiled",
"sourceMap": true,
"rootDir": "src",
"moduleResolution": "node",
"declaration": true,
"declarationDir": "dist/types",
"typeRoots": [
"node_modules/@types"
],
"baseUrl": "./",
"paths": {
"@microsoft/recognizers-text-number": ["../recognizers-number"],
"@microsoft/*": ["../*"]
}
},
"include": [
"src"
]
} and used drop from #23910 and was able to see that this issue gets resolved. Can you please give that a try as well. (Note the |
Thank you @sheetalkamat ! |
From @STayinloves on February 28, 2018 7:41
Version 1.20.1
Commit f88bbf9137d24d36d968ea6b2911786bfe103002
Date 2018-02-13T15:34:36.336Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
Steps to Reproduce:
JavaScript/packages/recognizers-number/src/number/parsers.ts
for example[ts] Cannot find module '@microsoft/recognizers-text'
.reload vscode the error disappears.
can also reproduce this bug.
Does this issue occur when all extensions are disabled?: Yes
Copied from original issue: microsoft/vscode#44710
The text was updated successfully, but these errors were encountered: