Different ways of installing node.js for Mac

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/u013870169/article/details/86076030

pkg install

node node spread throughout the executable file in / usr / local / bin non-soft link 

Npm install to / usr / local / lib / node_modules / npm, and soft link to / usr / local / bin

n module to the / usr / local / lib / node_modules / npm, and a soft link to the / usr / local / bin

n node module installed version of / usr / local / n / versions / node / ***

brew Installation

node installed to / usr / local / Cellar / node, and soft link to / usr / local / bin

Npm install to / usr / local / lib / node_modules / npm, and soft link to / usr / local / bin

n module to the / usr / local / lib / node_modules / npm, and a soft link to the / usr / local / bin

n node module installed version of / usr / local / n / versions / node / ***

n brew module and try not to use Hunzhao

Switching source scripts

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/rgf456/HomebrewInstall/master/install.rb)"

Guess you like

Origin blog.csdn.net/u013870169/article/details/86076030