简体   繁体   English

nvm 找不到“旧安装路径”

[英]nvm cannot find "old installation path"

Using Windows 10.使用 Windows 10。

I had installed nvm , npm and ng to a specific location.我已将nvmnpmng安装到特定位置。 Not the default one.不是默认的。 I have uninstalled everything as I want to place them in a different location now.我已经卸载了所有内容,因为我现在想将它们放在不同的位置。 I have nvm re-installed in a new location.我已将nvm重新安装在新位置。

But when I run nvm install lts .但是当我运行nvm install lts时。 I get:我得到:

ERROR open [old-path-where-I-had-previously-installed-nvm]\settings.txt: The system cannot find the path specified. ERROR open [old-path-where-I-had-previously-installed-nvm]\settings.txt: 系统找不到指定的路径。

I searched the Internet for this, but what I find is that many users get this error message because their username have space or special characters.我在 Internet 上进行了搜索,但我发现许多用户收到此错误消息是因为他们的用户名包含空格或特殊字符。 I'm not in this case at all, my user name is one word without special characters, and anyway, I didn't install NVM in a "User" folder.我根本不是这种情况,我的用户名是一个没有特殊字符的单词,反正我没有在“用户”文件夹中安装NVM。 Installation path also doesn't contain any space or special characters.安装路径也不包含任何空格或特殊字符。

Issue solved.问题解决了。 But I'm not sure why, here are two things I did:但我不知道为什么,我做了两件事:

  • Removed the old NPM path form "Path" Environment Variables.删除了旧的 NPM 路径形式“路径”环境变量。 (I hardly see how this is related.) (我几乎看不出这是如何相关的。)
  • Closed and re-opened my Command Prompt windows.关闭并重新打开我的命令提示符窗口。 (But I though I had already done it...) (但我虽然我已经做到了......)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM