Unable to change version of node with brew switch

前端 未结 2 1700
一生所求
一生所求 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

提交回复
热议问题