Skip to content

Cannot find module '@angular/core' after new update #2823

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

Closed
keithmichelson opened this issue Oct 21, 2016 · 6 comments
Closed

Cannot find module '@angular/core' after new update #2823

keithmichelson opened this issue Oct 21, 2016 · 6 comments

Comments

@keithmichelson
Copy link

keithmichelson commented Oct 21, 2016

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

Mac OSX El Capitan

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node -- version and paste the result here:

Can't run any ng commands all same error

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Updated the cli from beta 14 to beta 18 using all 6 steps.
ng init and all other ng commands give me "Cannot find module '@angular/core'"

The log given by the failure.

Normally this include a stack trace and some more information.

Error: Cannot find module '@angular/core'
at Function.Module._resolveFilename (module.js:455:15)
at Function.Module._load (module.js:403:25)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.
....

Mention any other details that might be useful.

@0x7r1574n
Copy link

Just encountered this issue as well.
To fix: run npm install and try again.

@keithmichelson
Copy link
Author

@shicechi Thanks for the reply. I just did that after deleting the node_modules. It does work now but I never ran the ng init command. Did you do that, hopefully it doesn't cause future problems?

@0x7r1574n
Copy link

@keithmichelson I did run the ng init command though. But instead of skipping all the file checks, inspect each by typing in d to see the difference and modify the files accordingly. Some config files do actually need a override for this update. I so far haven't encountered any other problems but I could be wrong.

@keithmichelson
Copy link
Author

@shicechi Thanks, I just went through and did the same just to make sure, luckily that command worked after the npm install.

@filipesilva
Copy link
Contributor

Dupe of #2410, fixed by #2870

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants