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 err
For me (on MacOSX) I had to do:
nvm install stable
npm install -g angular-cli
This installed ng into:
/usr/local/lib/node_modules/@angular/cli/bin/ng
But npm did not put a link to ng into
/usr/local/bin/
Which was why it was not part of the %PATH and therefore available from the command line except via an absolute address.
So I used the following the create a link to ng:
sudo ln -sf /usr/local/lib/node_modules/\@angular/cli/bin/ng /usr/local/bin/ng