Home > Web Front-end > JS Tutorial > body text

How to install a specified version of nodejs through brew on Mac

php中世界最好的语言
Release: 2018-05-29 10:33:21
Original
3282 people have browsed it

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 -fsSL

https: 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 native

module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version will appear.

3. 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
Copy after login

2. Check the installable node version

brew install homebrew/versions/node
Copy after login

3. Select a node version

brew install homebrew/versions/node5
Copy after login
This way you can successfully install the node5.x version

I 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template