官术网_书友最值得收藏!

  • Node.js Web Development
  • David Herron
  • 146字
  • 2021-06-25 21:53:59

Installing on macOS with Homebrew

Homebrew is another open source software package manager for macOS, which some say is the perfect replacement for MacPorts. It is available through their home page at http://brew.sh/. After installing Homebrew using the instructions on their website and ensuring that Homebrew is correctly set up, use the following:

$ brew update
... long wait and lots of output
$ brew search node
==> Searching local taps...
node libbitcoin-node node-build node@6 nodeenv
leafnode llnode node@4 nodebrew nodenv
==> Searching taps on GitHub...
caskroom/cask/node-profiler
==> Searching blacklisted, migrated and deleted formulae...

Then, install it this way:

$ brew install node
...
==> Installing node
==> Downloading https://homebrew.bintray.com/bottles/node-8.9.1.el_capitan.bottle.tar.gz
######################################################################## 100.0%
==> Pouring node-8.9.1.el_capitan.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
==> Summary
/usr/local/Cellar/node/8.9.1: 5,012 files, 49.6MB

Once installed this way, the Node.js command can be run as follows:

$ node --version
v8.9.1  
主站蜘蛛池模板: 辽中县| 钟祥市| 蚌埠市| 横峰县| 博客| 繁昌县| 太湖县| 永善县| 台南县| 农安县| 濉溪县| 肇庆市| 通渭县| 五台县| 廉江市| 离岛区| 洞口县| 丘北县| 邵阳县| 天津市| 沙湾县| 靖宇县| 文安县| 迭部县| 津市市| 韩城市| 裕民县| 平顺县| 潮安县| 香格里拉县| 余姚市| 南川市| 漯河市| 榆中县| 清丰县| 佛冈县| 囊谦县| 连江县| 尚志市| 无极县| 青神县|