Skip to content
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

Error: Cannot find module '@angular-devkit/core' - after clean install #9307

Closed
ghost opened this issue Jan 21, 2018 · 114 comments
Closed

Error: Cannot find module '@angular-devkit/core' - after clean install #9307

ghost opened this issue Jan 21, 2018 · 114 comments

Comments

@ghost
Copy link

ghost commented Jan 21, 2018

Versions


    _                      _                 ____ _     ___
   / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
  / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
 / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
/_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
               |___/

Angular CLI: 1.6.4
Node: 6.11.0
OS: win32 x64
Angular: _(yup, I don't see it, but I install it 2 days ago)_
...

Repro steps

  • ng new e-commerce-with-tut-ng4
  • cd e-commerce-with-tut-ng-4
  • ng serve (to test if works)

Observed behavior

After that I've got this ->

C:\Users\TheTanadu\Desktop\codetemp\e-commerce-with-tut-ng4>ng serve
module.js:471
    throw err;
    ^

Error: Cannot find module '@angular-devkit/core'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (C:\Users\TheTanadu\Desktop\codetemp\e-commerce-with-tut-ng4\node_modules\@angular-devkit\schematics\src\tree\virtual.js:10:16)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)

After all I came here but when I wanted to use ng --version in this path I've got same error like that what is up and I had to go cd .. and then use ng -v

Desired behavior

I wanted to see local server

Mention any other details that might be useful (optional)

Windows 10

@LarsMengel
Copy link

I struggled with the same problem just a minute ago. My project was generated using the v 1.6.0 of angular-cli.

  1. npm update -g @angular/cli
  2. editing my package.json changing the line
    "@angular/cli": "1.6.0",
    to
    "@angular/cli": "^1.6.0",
  3. npm update
    did the trick.

@ghost
Copy link
Author

ghost commented Jan 21, 2018

gosh thank you @LarsMengel :D That did it.

@ghost ghost closed this as completed Jan 21, 2018
@elvirdolic
Copy link

I have the same issue with version 1.6.4. @LarsMengle this works because latest patch version is used 1.6.5. My problem is that 1.6.5 increased the prod build from 9minutes to 30 minutes

@chandrarao22
Copy link

Thanks @LarsMengel , I am struggling from last 2 days. Now the issue resolved!!

@atereshkov
Copy link

The same with my 1.5.2 version.

atereshkov pushed a commit to atereshkov/DiberWebClient that referenced this issue Jan 21, 2018
@jlam55555
Copy link

I just started learning Angular a few days ago and this came up for the first time just now. Thanks @LarsMengel !

@brianjb-lfl
Copy link

Thank you @LarsMengel! Just ran into the same thing with 1.6.4. Solution worked like a charm.

@jadeite100
Copy link

I am using angular 1.6.5 for cli.
In the examples from angular documentation:
https://angular.io/tutorial/toh-pt6

In my package.json I change

original:

"@angular/cli": "1.5.0",

new:

"@angular/cli": "^1.5.0",

What does the "^" do exactly?

@jlam55555
Copy link

@jadeite100: Check out this link.

Excerpt:

So if you see ~1.0.2 it means to install version 1.0.2 or the latest patch version such as 1.0.4. If you see ^1.0.2 it means to install version 1.0.2 or the latest minor or patch version such as 1.1.0.

@samu1997
Copy link

Thank you @LarsMengel.

@ganeshanr12
Copy link

@LarsMengel. Thanks alot, Its works for me..

@ghost
Copy link

ghost commented Jan 22, 2018

@LarsMengel thank you very much. Was stuck few hours this morning trying to do this with VSTS

@kkajdd
Copy link

kkajdd commented Jan 22, 2018

Was this issue from yesterday onwards because we do see that this error is poping up suddenly from today?

@LarsMengel
Copy link

LarsMengel commented Jan 22, 2018

Seems so. I suspect for some reasons "angular-devkit/core" hasn´t been downloaded during the "ng new" process. Updating all the packages did the trick. Would be interesting to know the reason.

@kkajdd
Copy link

kkajdd commented Jan 22, 2018

Yes for us just updating @angular/cli did the trick

@psmyrdek
Copy link

Solved by updating to 1.6.5

@jadeite100
Copy link

Does anybody have the link to download the code for the book?
I brought the "ng-book: The Complete Guide to Angular 4 " on amazon.com but I can't see any link to download the code for the book?

@Dagonium
Copy link

Dude, I just wanted to thank you. I faced this similar error using CLI version 1.6.4, but using your instructions and updating to CLI 1.6.5, the error was gone and I got successful compilation. Thank you, sir!

31453 pushed a commit to arkime/arkime that referenced this issue Jan 22, 2018
@lawmbass
Copy link

Thanks @LarsMengel that solution worked out for me. 👍

@gerrymcdonnell
Copy link

thanks @LarsMengel had same problem and that fixed it.

gerrymcdonnell added a commit to gerrymcdonnell/testrestapi that referenced this issue Jan 22, 2018
Error: Cannot find module '@angular-devkit/core' - after clean install;

angular/angular-cli#9307
@tienthanhjlw
Copy link

Only need run 👍 :
npm i -D @angular-devkit/core

@adil-boukdair
Copy link

@tienthanhjlw solution fixed the issue, I am using CLI 1.6.4

@raphaelbluteau
Copy link

@tienthanhjlw fixed for me too, I am using v1.6.3

@gerrymcdonnell
Copy link

@tienthanhjlw yes that worked too!

@bobbypulpel
Copy link

@tienthanhjlw Thanks, it worked for me!

@aman119
Copy link

aman119 commented Jan 23, 2018

Thank you @LarsMengel. It worked for me

starhelios pushed a commit to starhelios/angular7-typescript-project that referenced this issue Jun 1, 2020
starhelios added a commit to starhelios/angular7-typescript-project that referenced this issue Jun 1, 2020
davidc05 added a commit to davidc05/angular-quick-app that referenced this issue Jul 20, 2020
@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 Mar 14, 2021
kinsagcit added a commit to kinsagcit/angular7-typescript that referenced this issue Sep 18, 2021
google-fan added a commit to google-fan/realworld-app-angular that referenced this issue Dec 17, 2021
antonyryan added a commit to antonyryan/angular-realworld-example-app that referenced this issue Jan 28, 2022
freedeveloper000 added a commit to freedeveloper000/angular-realworld-example-apps that referenced this issue Feb 28, 2022
FancyGeekGuru added a commit to FancyGeekGuru/Angular-Real-World-App that referenced this issue Mar 22, 2022
rflash5150 added a commit to rflash5150/angular-realworld-example-app that referenced this issue Jun 22, 2022
kevinforsterch added a commit to kevinforsterch/realworld-app-angular that referenced this issue Jun 26, 2022
Fly-Pig00 pushed a commit to Fly-Pig00/angular-realworld-app that referenced this issue Jul 13, 2022
superdev905 added a commit to superdev905/Angular-RealWorld that referenced this issue Jul 26, 2022
kronooss added a commit to kronooss/suit-social that referenced this issue Aug 22, 2022
codegenius1017 added a commit to codegenius1017/angular-realworld-example-app that referenced this issue Aug 28, 2022
RistoZoric pushed a commit to RistoZoric/angular-realworld-example-app that referenced this issue Oct 6, 2022
BestCryptoKnight pushed a commit to BestCryptoKnight/angular-realworld-app that referenced this issue Nov 6, 2022
DannyMay9082 added a commit to DannyMay9082/angular-app that referenced this issue Jan 14, 2023
VV-YY added a commit to VV-YY/angular-realword that referenced this issue Jan 17, 2023
golden821man added a commit to golden821man/angular-example that referenced this issue Mar 1, 2023
blue-sky-dev added a commit to blue-sky-dev/angular-realworld-example-app that referenced this issue May 5, 2023
Haruto2223 added a commit to Haruto2223/Angular-Forum that referenced this issue May 10, 2023
Seven-112 pushed a commit to Seven-112/angular-realworld-app that referenced this issue May 14, 2023
KimuraDanaka119 added a commit to KimuraDanaka119/angular-realworld-example-app that referenced this issue Jun 4, 2023
bringawesome added a commit to bringawesome/realworld-app-angular that referenced this issue Jul 3, 2023
thimba831 added a commit to thimba831/angular-realworld-app that referenced this issue Aug 22, 2023
muze-pus pushed a commit to muze-pus/angular-realworld-example-app that referenced this issue Dec 12, 2023
LegendaryNaix added a commit to LegendaryNaix/angular-realworld-example-app that referenced this issue Jun 12, 2024
This issue was closed.
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