'在 Windows10 中重新安装 node.js 后找不到模块 'process-nextick-args' npm 错误
'Cannot find module 'process-nextick-args' npm error after reinstalling node.js in Windows10
我从 official site 下载了 Node.js (4.4.5 LTS) 并安装它来更新我的 Windows10 中的节点,发现 npm 不工作(节点工作)。我通过以 "remove" 模式安装它来卸载节点,然后重新安装,但错误仍然存在。 npm -v 报错如下:
```
module.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:\用户\\AppData\Roaming\npm
and
C:\程序 Files\nodejs
With 'which npm' it produced:
/c/Program Files/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/Program Files/nodejs/node
```
如有任何建议,我们将不胜感激。
链接2:Installing Node.js (and npm) on Windows 10
Per this link it is necessary to delete node and node_modules from 'local' directories in order to remove node (and npm) completely. Thinking I only need to remove old npm relics to solve the error about 'Error: Cannot find module 'process-nextick-args', I tried deleting npm and npm-cache inside AppData/Roaming 目录手动,然后在 'repair' 模式下重新安装节点,并且(重启后)最终 npm 工作。
我在 brew 更新后遇到了这个问题。我正在使用 nvm 所以我只是重新配置 nvm 以使用我的版本 nvm use vx.x.x
我从 official site 下载了 Node.js (4.4.5 LTS) 并安装它来更新我的 Windows10 中的节点,发现 npm 不工作(节点工作)。我通过以 "remove" 模式安装它来卸载节点,然后重新安装,但错误仍然存在。 npm -v 报错如下: ``` module.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:\用户\\AppData\Roaming\npm
and
C:\程序 Files\nodejs
With 'which npm' it produced:
/c/Program Files/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/Program Files/nodejs/node
```
如有任何建议,我们将不胜感激。
链接2:Installing Node.js (and npm) on Windows 10
Per this link it is necessary to delete node and node_modules from 'local' directories in order to remove node (and npm) completely. Thinking I only need to remove old npm relics to solve the error about 'Error: Cannot find module 'process-nextick-args', I tried deleting npm and npm-cache inside AppData/Roaming 目录手动,然后在 'repair' 模式下重新安装节点,并且(重启后)最终 npm 工作。
我在 brew 更新后遇到了这个问题。我正在使用 nvm 所以我只是重新配置 nvm 以使用我的版本 nvm use vx.x.x