-
Notifications
You must be signed in to change notification settings - Fork 30.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 '@angular/core' #34681
Comments
I can verify this issue. |
I'm having the same issue just after the latest update |
Can you please try installing |
@mjbvz, that didn’t help for me. In fact, packages cannot be built using |
@Frikki I'm just trying to track down the root cause right now. What I want to understand is if you are seeing compile errors with the latest insiders build of TypeScript (2.5.3-insiders.20170919) vs with TypeScript 2.5.2 that we included in VSCode 1.16 Independent of VSCode, do you see new compile errors when running |
Same issue here. I found that by setting VSCode to use my workspace version (2.5.2), the problem went away. |
Hey @mhegazy / @RyanCavanaugh, should we move this over to the TS repo? The issue sounds similar to microsoft/TypeScript#18630 |
Yes, I see compilation errors when running |
Workaround
|
Thank, yes switching the workspace to use a stable TS version like 2.5.2 is the proper workaround @mhegazy / @RyanCavanaugh It sounds like users are seeing this on the 2.5.3 insiders but not on 2.5.2. Does that still sound consistent with microsoft/TypeScript#18630 which seems to track a regression that first appeared in TS 2.5? |
This is working on me with |
Thanks @andy-ms! Closing as upstream. This should be fixed when we pick up the next TS insiders drop |
@smlombardi Use |
When is this going to be fixed? I am stuck with insiders and have no work around, is this going to be fixed soon? Or should I install VSCode for now? |
@ayyash Same advice I gave to @smlombardi -- install |
WORKAROUND FOR DESPERATE ONESI think I have tried everything that was mentioned across many different issues: reloading projects, using different versions of typescript, playing with type related settings in tsconfig. Nothing seems to work. Finally, I decided to copy (only for dev since compilation with tsc works without any problems) whole module (it had typings build in) to
and it works 🎉 |
FWIW, the advice from @andy-ms worked fine for me. I installed TS 2.5.2 globally, and added |
Finally I nailed it down: i was missing |
@krzkaczor Without that setting, TypeScript will use a different method to attempt to resolve modules, that doesn't look in |
@andy-ms Yeah you're totally right. I think I went "full retard" on this one — I was using all the time some weird mix of |
when I upgrade the lastest vscode 1.17.0 insiders,
I got the error :[ts] Cannot find module '@angular/core',even though my app can also run.
now I uninstall the 1.17.0 insiders and install 1.16.1 stable version.It works well.
hope for testing well when release new version next time.
Tks.I really like it~
The text was updated successfully, but these errors were encountered: