1

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.

@angular-devkit/build-angular specification

6
  • possible duplicate of stackoverflow.com/questions/50333003/… Commented Oct 16, 2018 at 20:56
  • As I said have tried without success @alokstar Commented 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. Commented 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/cli Commented Oct 16, 2018 at 21:13
  • 1
    Thanks @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. Commented Oct 19, 2018 at 9:55

1 Answer 1

3

try this.

npm i --only=dev

after that npm install and run you project

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.