nvm报错 ERROR open \settings.txt: The system cannot find the file specified

  1. 在安装其他软件时,不小心将nvm的环境变量给删除了
  2. 在恢复了系统path中的 C:\Users\user\AppData\Roaming\nvm(nvm的安装路径) 后,使用nvm时报错
    ERROR open \settings.txt: The system cannot find the file specified
  3. 对比了我与其他人的环境变量后,发现我少了%NVM_HOME%,%NVM_SYMLINK%两个变量
  4. 在path中添上两个路径
    nvm报错 ERROR open \settings.txt: The system cannot find the file specified_第1张图片

  5. 在系统变量中添上两个变量,变量值可以在nvm安装文件中的 settings.txt 中查看,
    root:nvm_home
    path: nvm_symlink
    nvm报错 ERROR open \settings.txt: The system cannot find the file specified_第2张图片

  6. 重启电脑,用administrator模式打开cmd,键入nvm,OK
  7. 参考链接:https://github.com/coreybutler/nvm-windows/issues/39

你可能感兴趣的:(nodejs,nvm)