vikramvi
vikramvi

Reputation: 3635

installing particular version of node with homebrew is giving error

I neeed to install node version 10 and has followed below steps

above command gives error, thus tried

Now I'm getting error

If you need to have this software first in your PATH instead consider running:
  echo 'export PATH="/usr/local/opt/node@10/bin:$PATH"' >> ~/.bash_profile

I've checked .bash_profile and above entry does exist, not getting why above error keeps on showing ?

Upvotes: 0

Views: 15006

Answers (2)

Tomáš Pánik
Tomáš Pánik

Reputation: 596

I believe that you are still running an older node version. First, try to uninstall it with brew uninstall node@8 assuming that node 8 is installed.

Then

brew uninstall --ignore-dependencies --force node
brew uninstall --ignore-dependencies --force icu4c
brew install icu4c
brew unlink icu4c && brew link icu4c --force
brew install node@10

I experienced the same problem few days ago and I found tis blog post helpful: Mac Brew Node 10 upgrade

Upvotes: 2

Roopak A Nelliat
Roopak A Nelliat

Reputation: 2551

As commented by @quentin, this is not an error, it is an informational message.

Secondly, I prefer using the package n for installing a specific version of Node. https://www.npmjs.com/package/n

Initially, you get the default version of node installed. And then you use n to play around with the Node versions.

Install n - $ npm install -g n
Installing node 10 - $ n 10
Installing node stable - $ n stable
Installing node latest - $ n latest
Installing node lts - $ n lts

Upvotes: 6

Related Questions