Home >Web Front-end >JS Tutorial >How to install a specified version of nodejs through brew on Mac
This time I will show you how to install the specified version of nodejs through brew in Mac. Install the specified version of nodejs through brew in Mac. What are the precautions?. Here are the actual cases. , let’s take a look.
1. Install brew
Run /usr/bin/ruby -e "$(curl -fsSLhttps: on the terminal) //raw.githubusercontent.com/Homebrew/install/master/install)"
2. Install nodejs
Run brew Just install node, but the node installed in this way is the latest node. After I installed it, it is node6. A message similar to (node:7844) fs: re-evaluating native3. Install the specified version of node
For the old version of brew, you can use brew versions nodejs. After running, it will prompt Error: The `versions ` command is no longer supported. brew versions have been deprecated.1. Need to install homebrew-version
brew tap homebrew/versions
2. Check the installable node version
brew install homebrew/versions/node
3. Select a node version
brew install homebrew/versions/node5This way you can successfully install the node5.x versionI believe you have mastered it after reading the case in this article For more exciting methods, please pay attention to other related articles on the php Chinese website! Recommended reading:
How to deal with Mac installation thrift error due to bison
How to use Taobao mirror cnpm to install Vue.js
The above is the detailed content of How to install a specified version of nodejs through brew on Mac. For more information, please follow other related articles on the PHP Chinese website!