我从官方站点下载了Node.js(4.4.5 LTS),并安装了它以更新Windows10中的节点,发现npm无法正常工作(节点正常工作)。我以“删除”模式安装了该节点,然后重新安装了该节点。 ,但错误仍然存在。npm -v上的错误如下:```module.js:327 throw err; ^
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 \漫游\ npm and
C:\程序文件\ nodejs With 'which npm' it produced:
/ c /程序文件/ nodejs / npm With 'whereis npm' it showed:
npm:/ cygdrive / c /程序文件/ nodejs / npm / cygdrive / c /程序文件/ nodejs / npm.cmd With 'which node' I got
/ c /程序文件/ nodejs /节点``
将不胜感激任何建议。
通过此链接,有必要从“本地”目录中删除node和node_modules,以便完全删除节点(和npm)。认为我只需要删除旧的npm文物即可解决有关“错误:找不到模块'process-nextick-args'的错误,我尝试手动删除AppData / Roaming目录中的npm和npm-cache,然后在'repair中重新安装节点模式,并且(在重新启动之后)终于npm起作用了。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句