Hello guys, I am Clark! In this post I am going to share about install npm. In the official document of npm, you can install npm through two way, and npm is node package manager, so the two way are all related to node.
To run ArduinoBlocks-Connector on macOs 10.15 (Catalina) you need to follow these steps: Disable application 'security policies', you can follow this tutorial Run (only the first time) pressing CTRL key to assign file permissions to: python and abconnector (files inside the extracted folder). Catalina Hackintosh Install Full Guide. This guide should work on most newer computers that are less than 5 years old. If you need a new system thats hackintosh compatible check out our list of compatible parts or the build list for hackintosh friendly parts.
The first way is node installer which I always did when I want to install npm before, because this way is easily, you just need to go to the website of node, download the node installer and install it(Whatever you choose the LTS or Current version), you will got npm when you finished.
The second way is through NVM, also is main way I want to share in this post. But I never do it, so if any mistake I did, please comment below let me know, thanks!
The NVM meaning is node version manager, according to the official document, something we can know:
- This way is more recommend than node installer.
- You can install and switch between multiple versions of node and npm in your device.
So if we choose the NVM, we can test if our application work well on different version of node. It sounds nice! Let’s install NVM!
Install Kext Terminal Catalina
If your device’s OS is window, you can download the latest NVM installer from releases. Install NVM on the window is more easily than on the macOS I think.
If you finished download and install, you could open command line and type nvm
, that would look like this if you success install NVM:
If your device’s OS is macOS, you can execute a command below through terminal(According to here):
If you finished the step and you already have installed npm before then NVM would check all modules you installed and ask if you want to uninstall they from global:
Because if you installed the NVM, your original node and npm will be overwritten by NVM. But this step we will handle later, because we have something not yet finished.
My terminal is using zsh(The latest macOS Catalina default terminal is use zsh), so I need a a new terminal window and add the following to file ./zshrc
, if your terminal is not zsh, please add in file ./bash_profile
:
And type i
to start editing it, and paste the following:
After you paste the command above, you can click button esc
on keyboard, continue type :wq
and enter it:
If you finished above all thing, please you close and reopen a new terminal then type nvm
check if you successful installed:
Next if you want to use current versions of node and npm through your NVM, you can run following. The use
also is command which you want to switch the version of node:
The NVM will apply versions of node and npm to the NVM, we can continue run command below check:
Anything will like you use node or npm before install NVM.
How to install other versions of node and npm
If you want to install other versions of node and npm, the first you can run following see all versions of node you can install:
Next if I want to install latest LTS version of node v12.18.3
, I can run following:
Install Macos Catalina Via Terminal
Then we can run the following command to check the version of node currently use by NVM:
So if I want to install the v12.18.3
and check if it is successful switch to versions I installed:
So good! You also can uninstall version of node you don’t want to use:
Last, you should be know, the version of node would not influences each other, each version of node will be independent! So just take easy to using any version of node to develop your applications!
Install Macos Catalina Terminal
I hope this post can be helpful for you, and if you have any opinions or questions, please comment below, I would very appreciate every thing! :)