Whenever I run the npm command on Microsoft Windows PowerShell, it opens the Windows 10 popup asking What do you want to do with this file?... what do I want to open it with?
But I can run node -v and it works fine. This means that I cannot do an "& npm install" from PowerShell to make it run cmd and that command.
Any ideas? I've looked around and no success...
In powershell run the command "get-command npm"
It may give you the wrong path.
I was getting the same error and the command told me it was finding npm in C:\WINDOWS\system32\npm
which was a 0 byte file. I deleted it and powershell now found the right path for npm.
删除0字节文件路径:C:\WINDOWS\system32\npm 右键npm删除。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.