【问题标题】:'Cannot find module 'process-nextick-args' npm error after reinstalling node.js in Windows10'在 Windows10 中重新安装 node.js 后,找不到模块'process-nextick-args' npm 错误
【发布时间】: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 ```

如果有任何建议,我们将不胜感激。

链接2:Installing Node.js (and npm) on Windows 10

【问题讨论】:

    标签: node.js windows npm-install


    【解决方案1】:

    根据this link,必须从“本地”目录中删除节点和 node_modules 才能完全删除节点(和 npm)。认为我只需要删除旧的 npm 遗物即可解决有关“错误:找不到模块 'process-nextick-args”的错误,我在 AppData/Roaming 目录中手动尝试了deleting npm and npm-cache,然后以“修复”模式重新安装节点,并且(重新启动后)最后 npm 工作。

    【讨论】:

      【解决方案2】:

      我在 brew 更新后遇到了这个问题。我正在使用 nvm 所以我只是重新配置 nvm 以使用我的版本 nvm use vx.x.x

      【讨论】:

        猜你喜欢
        • 2018-07-26
        • 1970-01-01
        • 2021-12-29
        • 2020-01-17
        • 2016-12-09
        • 1970-01-01
        • 2011-11-12
        • 1970-01-01
        • 2018-09-16
        相关资源
        最近更新 更多