【发布时间】:2016-09-26 02:12:21
【问题描述】:
我从official site 下载了 Node.js (4.4.5 LTS) 并安装它以更新我的 Windows10 中的节点,发现 npm 不工作(节点工作)。我通过以“删除”模式安装它来卸载节点,然后重新安装,但错误仍然存在。 npm -v 报错如下: ``` 模块.js:327 抛出错误; ^
Error: Cannot find module 'process-nextick-args'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous>
(C:\Users\<my-name>\AppData\Roaming\npm\node_modules\np
m\node_modules\readable-stream\lib\_stream_readable.js:6:23)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
Per suggestions from [this link][2] I have edited the PATH of Environmental Variables (in both User and System) to include:
C:\Users\\AppData\Roaming\npm
and
C:\程序文件\nodejs
With 'which npm' it produced:
/c/程序文件/nodejs/npm
With 'whereis npm' it showed:
npm:/cygdrive/c/Program Files/nodejs/npm
/cygdrive/c/Program Files/nodejs/npm.cmd
With 'which node' I got
/c/程序文件/nodejs/node
```
如果有任何建议,我们将不胜感激。
【问题讨论】:
标签: node.js windows npm-install