npm不被认为是内部或外部命令

时间:2023-01-18 07:25:03

I am getting npm not recognized as internal or external command.

User variable Path is set to : %AppData%\npm;C:\Program_Files\nodejs\node_modules\npm;C:\Program_Files\nodejs;

我得到npm不被认为是内部或外部命令。用户变量Path设置为:%AppData%\ npm; C:\ Program_Files \ nodejs \ node_modules \ npm; C:\ Program_Files \ nodejs;

I have tried with npm version 5.0 and 3.10.8 .

我试过npm版本5.0和3.10.8。

Error screenshot

错误截图

1 个解决方案

#1


1  

I solved by below steps:
1.run echo %comSpec% in command prompt or terminal
2.Check whether below entry exists 
C:\WINDOWS\SysWOW64\cmd.exe
3.Then remove above entry from system environment variable.

#1


1  

I solved by below steps:
1.run echo %comSpec% in command prompt or terminal
2.Check whether below entry exists 
C:\WINDOWS\SysWOW64\cmd.exe
3.Then remove above entry from system environment variable.