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

前端 未结 16 1427
梦毁少年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:44

    Just resolved the issue. I symlinked $HOME/.nvm to $DEV_ZONE/env/node/nvm directory. I was facing same issue. I replaced NVM_DIR in $HOME/.zshrc as follows

    export NVM_DIR="$DEV_ZONE/env/node/nvm"
    

    BTW, please install NVM using curl or wget command not by using brew. For more please check the comment in this issue on Github: 855#issuecomment-146115434

提交回复
热议问题