nvm is not compatible with the npm config “prefix” option:

前端 未结 16 1426
梦毁少年i
梦毁少年i 2020-12-07 06:47

I am trying to run another NodeJS version with nvm but getting this error:

$ nvm use v4.2.4

nvm is not compatible with the npm config \"prefix\         


        
16条回答
  •  失恋的感觉
    2020-12-07 07:32

    I had the same problem and it was really annoying each time with the terminal. I run the command to the terminal and it was fixed

    For those try to remove nvm from brew

    it may not be enough to just brew uninstall nvm

    if you see npm prefix is still /usr/local, run this command

    sudo rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*}

提交回复
热议问题