Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular - Error: spawn cmd ENOENT

Tags:

angularjs

Hi I have problem when I generate angular - yo angular.

I'm all done. Running bower install & npm install for you to install the required dependencies. If this fails, try running the command yourself.

invoke angular:route invoke angular:controller:C:\Users\david\AppData\Roaming\npm\node_modules\generator-angular\route\index.js create app\scripts\controllers\about.js events.js:85 throw er; // Unhandled 'error' event ^ Error: spawn cmd ENOENT at exports._errnoException (util.js:746:11) at Process.ChildProcess._handle.onexit (child_process.js:1053:32) at child_process.js:1144:20 at process._tickCallback (node.js:355:11)

Anyone show me how to solve this issue? Thanks.

like image 607
Daviv Ho Avatar asked Sep 18 '15 15:09

Daviv Ho


2 Answers

Im not sure why this error comes about, however i managed to run my Angular application by running with : ng serve instead of ng serve --open . Please not you will need to copy the url manually and place it in the browser afterwards which should be http://localhost:4200/

like image 165
Daniel Goncalves Avatar answered Sep 21 '22 15:09

Daniel Goncalves


I got the same issue for windows 8 and tried several installations after doing changes to AppData/Roaming folder. None of the solutions worked for me. The issue is because of an environment variable of your system path is missing . Add "C:\Windows\System32\" value to your system PATH variable.

like image 42
Chaya Sandamali Avatar answered Sep 17 '22 15:09

Chaya Sandamali