Studying Angular, Trying to do those simple steps for generate new projects, but when I am trying to start ng-serve I got those errors:
Could not find module "@angular-devkit/build-angular" from "C:\\Users\\lingar\\AngularProjects2\\project1".
Error: Could not find module "@angular-devkit/build-angular" from "C:\\Users\\lingar\\AngularProjects2\\project1".
at Object.resolve (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\core\node\resolve.js:141:11)
at Observable.rxjs_1.Observable [as _subscribe] (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\src\architect.js:132:40)
at Observable._trySubscribe (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:43:25)
at Observable.subscribe (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:29:22)
at DoOperator.call (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\tap.js:29:23)
at Observable.subscribe (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:24:22)
at C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\util\subscribeTo.js:22:31
at Object.subscribeToResult (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\util\subscribeToResult.js:7:45)
at MergeMapSubscriber._innerSub (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:75:38)
at MergeMapSubscriber._tryNext (C:\Users\lingar\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\operators\mergeMap.js:72:14)
Have tried a lot of those solutions without success.
Does someone have ideas ?
Edit: Solved!
Thanks to @Seth McClaine answer in the comments I went to the Technical Specifications of this module @angular-devkit/build-angular,
From there I took the install command and run it on the cmd :
npm i @angular-devkit/build-angular ,
and from then it's working well.
BTW - A weird issue that I've before the solution that only in the root user directory it's worked well.
-
possible duplicate of stackoverflow.com/questions/50333003/…alokstar– alokstar2018年10月16日 20:56:56 +00:00Commented Oct 16, 2018 at 20:56
-
As I said have tried without success @alokstarlingar– lingar2018年10月16日 21:00:14 +00:00Commented Oct 16, 2018 at 21:00
-
okay, the other thing i can suggest is, if you updated any of your dependency, then try deleting and installing node modules again and then try to run it.alokstar– alokstar2018年10月16日 21:06:59 +00:00Commented Oct 16, 2018 at 21:06
-
build-angular is still WIP according to this npmjs.com/package/@angular-devkit/build-angular You may want to look at pulling a previous version of @angular/cliSeth McClaine– Seth McClaine2018年10月16日 21:13:26 +00:00Commented Oct 16, 2018 at 21:13
-
1Thanks @SethMcClaine I'll consider this in future problems if will arise. Anyway your answer gave me the direction to the solution and it's solved.lingar– lingar2018年10月19日 09:55:33 +00:00Commented Oct 19, 2018 at 9:55
1 Answer 1
try this.
npm i --only=dev
after that npm install and run you project