Reputation: 68
It happens that when I install angular cli, it gets stuck at this point
I have looked for any solution , install/uninstall node.js and tried to use different versions of node and npm with no success.
EDIT: After uninstalling node.js, erasing npm folder in appdata, and reinstalling again, it installs but it does not recognize the ng command as shown here
Upvotes: 2
Views: 6474
Reputation: 170
I had to add npm to the Path user variable:
Upvotes: 0
Reputation: 414
It happens that your node.js and angular visions are not compatible.
After the install and remove all the node files from on your pc. then try these commands.
npm install
npm install -g @angular/cli 04 ng new <project name>
cd <your project location>
ng serve
npm install
and ng serve
)If this is still not working, provide a sample of the .json file in your question.
Upvotes: 0
Reputation: 400
It seems it is a path issue. This solution helped me fix it on macOs High Sierra.
npm install -g @angular/cli
Make sure the ng path is correct
cd ~/npm-global/bin
create .bashrc file on your home directory
touch ~/.bashrc
Add ng as alias
press i (enables edit mode) then type in the following
Your terminal wont take bash updates until a restart but the following command will let you use the updates during the terminal session:
source ~/.bashrc Check that ng works
ng --version
Found it from https://github.com/angular/angular-cli/issues/5021
Upvotes: 1