npm 命令问题 [英] npm command issue

查看:61
本文介绍了npm 命令问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  • 我已经在我的系统上安装了 node js.(Windows 7).
  • 我已将环境路径变量设置为"C:\Users\pUser\AppData\Roaming\npm\node_modules\npm".
  • 用户文件夹中有一个 .npmrc 文件.其中为 https_proxy,proxy,registry 设置了值.
  • 我尝试如下检查 node 版本和 npm 版本:

  • 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:

一个.D:\Pooja Project\project-sd-develop-12>node -v输出 -->v6.9.4

a. D:\Pooja Project\project-sd-develop-12>node -v output -->v6.9.4

b.D:\Pooja Project\project-sd-develop-12>npm -v(不显示任何结果)

b. D:\Pooja Project\project-sd-develop-12>npm -v (Does not show any result)

它根本不响应 npm 命令.既没有任何输出也没有任何错误.(它甚至没有显示任何成功或错误消息.)屏幕截图附加的 npm 命令卡住了,没有进一步的结果或任何错误我是否遗漏了任何步骤?

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?

推荐答案

您设置了错误的环境路径.应该是:

You have set the wrong environment path. It should be:

C:\Users\pUser\AppData\Roaming\npm

不是 node_modules

如果您仍然面临同样的问题,那么.通过运行 where npm 你将获得 npm 文件夹的所有路径.然后从系统中卸载 node js 并尽可能删除 npm 文件夹.新安装的节点js.

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.

这篇关于npm 命令问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆