![]() If that doesn't work, you may have run sudo npm install at some point, if that's the case you'd need to run sudo npm install -g angular/cli due to permission issues. # update current shell with new path (not needed for new sessions)Īngular CLI ng command not found on Mac Os $ echo 'export PATH=~/.node_modules/bin:$PATH' > ~/.zshrc zshrc instructing it to include that directory in your $PATH, making the executables known to the shell $ npm config set prefix '~/.node_modules' # set npm "prefix" config to that directory # create a new directory where npm will install packages You can typically fix that using chown or chmod on your ~/.npm folder. ![]() Reissue ng version and you should see it in your zsh shell: If all the above methods doesn't work, then install angular-cli with Homebrew. Run this in your Terminal (ZSH): brew install angular-cli. After this, make sure you restart terminal and you should be able to issue nvm-version to see version of installed nvm. Next, install Node (npm will be installed with Node): brew install node To test out your Node and npm install, try installing Grunt (you might be asked to run with sudo): npm install -g grunt-cli If that worked then congratulations you’ve installed Node.js, npm, and Grunt. Have a coffee, comeback and run this to test. Restart terminal and you should be able to use ng version to see version installed on your system. If not retrace your steps or post a question to Stack Overflow. At the time of writing this post, the current LTS version is 16. For Mac OS X and Linux, follow the installation and update instructions in the README.md file for the NVM GitHub repo. #INSTALL ANGULAR NVM MAC OS X FOR MAC OS X#Ĭurl -o- | bashĮxport NVM_DIR="/Users/your-user-name/. Running the command nvm install node would install the current version with the latest features. To install the current LTS Node.js version, execute: nvm install -lts. Then, verify the version by running: node -version. #INSTALL ANGULAR NVM MAC OS X FOR MAC OS X#.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |