1

I am trying to install a new angular starter project with ng new project-name but everytime I am ending up with the below error codes

PS H:\Desktop\cool-app> ng serve
Could not find module "@angular-devkit/build-angular" from "H:\\Desktop\\cool-app".
Error: Could not find module "@angular-devkit/build-angular" from "H:\\Desktop\\cool-app".
    at Object.resolve (C:\Users\G01205980\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\G01205980\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\@angular-devkit\architect\src\architect-legacy.js:153:40)
    at Observable._trySubscribe (C:\Users\G01205980\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (C:\Users\G01205980\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:30:22)
    at C:\Users\G01205980\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:99:19
    at new Promise (<anonymous>)
    at Observable.toPromise (C:\Users\G01205980\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\rxjs\internal\Observable.js:97:16)
    at ServeCommand.initialize (C:\Users\G01205980\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:130:86)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:188:16)
    at bootstrap_node.js:609:3
PS H:\Desktop\cool-app> npm install
Terminate batch job (Y/N)?
Terminate batch job (Y/N)? n
PS H:\Desktop\cool-app> npm install
[       ...........] \ postinstall: sill install executeActions
Kishan Oza
  • 1,707
  • 1
  • 16
  • 38
Rohit Sharma
  • 159
  • 4
  • 17
  • What is your CLI version, is it outputting another error before that, have you submitted this issue to the github repository of the CLI, do you have any admin permissions going on, what is the command you type ... ? Give some context ! –  Apr 03 '19 at 09:23
  • Possible duplicate of [Could not find module "@angular-devkit/build-angular"](https://stackoverflow.com/questions/50333003/could-not-find-module-angular-devkit-build-angular) – Sandy Sanap Apr 03 '19 at 09:34
  • H:\>node -v v8.10.0 H:\>npm -v 6.9.0 My problem is quite different, my installation process is getting stuck at thispoint [ ...........] \ postinstall: sill install executeActions, Its been half an hour and still i am seeing the same message. – Rohit Sharma Apr 03 '19 at 09:44

2 Answers2

2

looks like node dependencies are not installed

run npm install then try again

AbdulKareem
  • 1,199
  • 8
  • 24
1

Install @angular-devkit/build-angular as dev dependency.

npm install --save-dev @angular-devkit/build-angular

or,

yarn add @angular-devkit/build-angular --dev
Kishan Oza
  • 1,707
  • 1
  • 16
  • 38