问题
- I have installed node js on my system. (Windows 7).
- I have set the environment path variable to
"C:\Users\pUser\AppData\Roaming\npm\node_modules\npm"
. - There one .npmrc file in users folder. Which has values set for https_proxy,proxy,registry.
I try to check the node version and npm version as follows:
a. D:\Pooja Project\project-sd-develop-12>node -v output -->v6.9.4
b. D:\Pooja Project\project-sd-develop-12>npm -v (Does not show any result)
It doesn't respond at all for npm command.Neither any output nor any error. ( It is not even showing any success or error message.) The screen shot attached npm command gets stuck no futher result or any error Am I missing any step?
回答1:
You have set the wrong environment path. It should be:
C:\Users\pUser\AppData\Roaming\npm
not the npm
inside node_modules
If Still you are facing the same issue then.
By running where npm
yOu will get all the paths for npm folder. Then uninstall the node js from your system and delete the npm folder wherever possible. Freshly installed node js.
来源:https://stackoverflow.com/questions/41670317/npm-command-issue