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

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

    This may be a conflict with your local installation of Node (if you had it installed via another way than NVM in the past). You should delete this instance of node:

    1. remove node_modules sudo rm -rf /usr/local/lib/node_modules
    2. remove node sudo rm /usr/local/bin/node
    3. remove node link cd /usr/local/bin && ls -l | grep "../lib/node_modules/" | awk '{print $9}'| xargs rm

    After you cant install nvm

提交回复
热议问题