你好,
你可以试试以下任意方式
一.注册表
打开注册表编辑器,找到路径
HKEY_LOCAL_MACHINE\System\ControlSet002\Control\Session Manager\Environment\Path
二.手动添加
在cmd中输入
where <command> 比如where npm。
在系统变量中找到path
点击编辑。
手动添加步骤1中的path
重启电脑
对产生错误的命令重复上述步骤。

此致
Jenny
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.