I had the opportunity to use node.jp at work, I have the opportunity to use different node versions on multiple systems, and now I can switch node versions in virtual environments (CentOs)
For now, install node and npm (CentOs)
yum install gcc gcc-c++
yum install nodejs npm –enablerepo=epel
brew install node
npm install -g n
Specify the path using ~ / .bash_profile
cd
vi .bash_profile
Buy the following wording in .bash_profile
export N_PREFIX=$HOME/.n
export PATH=$N_PREFIX/bin:$PATH
Apply adjustment
source .bash_profile
Now you're ready!
newest version
$ n –stable
$ n –latest
$ n latest
Specific version
$ n 5.7.1
You can switch between the arrow keys and the Enter key using the n command.
# n
ο node/10.17.0
node/12.18.3
Use up/down arrow keys to select a version, return key to install, d to delete, q to quit
Now you can easily switch the version of node, it really helps
https://qiita.com/jaxx2104/items/2277cec77850f2d83c7a https://blog1.mammb.com/entry/2019/11/26/090000 https://qiita.com/bigplants/items/2d75bf552e0da4a7e822
Recommended Posts