Unable to change version of node with brew switch

前端 未结 2 1699
一生所求
一生所求 2021-01-17 18:28

I\'m trying to use node 8.9.1 but when trying to update using brew it says 8.9.1 is already installed

James-MacBook:~ james$ brew upgrade node
Error: node 8.         


        
相关标签:
2条回答
  • 2021-01-17 19:05

    It sounds like you have some version of node that is installed without using Homebrew.

    1. First of all, check if you installed your node with nvm by check if you have a .nvm directory in home directory ls -la
      1. if you do, remove that directory
      2. brew update && brew install node@8 (whichever node you want)
      3. brew unlink node@0
      4. brew link --force node@8
      5. Do brew update && brew upgrade node@8

    Happy coding

    0 讨论(0)
  • 2021-01-17 19:12

    nvm kind of slows down your terminal. I found it annoying! you can always just install node thats compatible with npm here's the link

    node releases link!

    look for pkg if your mac user, and msi for windows users

    0 讨论(0)
提交回复
热议问题