ng-cli error in Node js 7.x

144 Views Asked by At

I am using Windows 10. I installed nodejs 7.4.0 using windows installer. I installed typescript globally. I installed ng-cli globally. Then I went to command prompt into my new project folder and did "ng init". It throws the following error.

events.js:154
  throw er; // Unhandled 'error' event
  ^

Error: spawn sh ENOENT
    at exports._errnoException (util.js:893:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32)
    at onErrorNT (internal/child_process.js:348:16)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)
    at Function.Module.runMain (module.js:449:11)
    at startup (node.js:148:18)
    at node.js:405:3

Any advise please ?

1

There are 1 best solutions below

0
On

The problem was I should have installed "angular-cli" instead of "ng-cli". This fixed my issue.