ng: command not found while creating new project using angular-cli

lego picture lego · May 14, 2016 · Viewed 198.3k times · Source

Installed angular-cli globally using (npm install -g angular-cli) but when I'm trying to create project using ng new my-project it is throwing error:

ng: command not found

Answer

abhinavroy23 picture abhinavroy23 · Dec 20, 2017

The issue is simple, npm doesn't know about ng

Just run npm link @angular/cli and it should work seamlessly.