Reputation: 13
Nodejs version installed-8.12.0 npm version installed- 6.4.1
I was able to install angular CLI using "npm install -g @angular/cli" but when I try to create a project using "ng new myapp", I get the error below:
events.js:183 throw er; // Unhandled 'error' event
Error: spawn C:\Windows\system32\cmd.exe;E:\apache—maven-3.5.4\bin; ENOENT at Process.ChildProcess._handle_onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:362:16) at _combinedTickCallback (internal/process/next_tick_js:139:11) at process._tickCallback (internal/process/next_tick_js:181:9)
Upvotes: 0
Views: 598
Reputation: 31805
Your ComSpec environment variable is wrong, replace:
%SystemRoot%\system32\cmd.exe;E:\apache-maven-3.5.4\bin;
With the following:
%SystemRoot%\system32\cmd.exe
Then restart your cmd
and retry to generate a project.
I have no idea why Maven got in there, it should not affect your Maven builds though.
Upvotes: 1
Reputation: 638
These types of issues can happen due to proxy errors, typically behind a firewall. See https://github.com/angular/angular-cli/issues/11386
Do you have a mechanism to enter your proxy when running "npm install"?
Do note that in most instances where the process fails when installing the dependencies one can run "npm install" after the CLI finished configuring the new application.
Upvotes: 0