【问题标题】:how can i solve this problem with Node package manager?如何使用 Node 包管理器解决这个问题?
【发布时间】:2020-06-02 15:54:37
【问题描述】:

我尝试运行此安装:

npm install nw@0.44.1-sdk nw-builder -D

但它给了我这个问题。如果我尝试安装另一个软件包,我不会收到此消息。

我也清除 npm 缓存并删除 node_modules

我还设置了公司代理

tunneling socket could not be established, statusCode=407
npm WARN test@1.0.0 No description
npm WARN test@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nw@0.44.1-sdk postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nw@0.44.1-sdk postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\H90431283\AppData\Roaming\npm-cache\_logs\2020-02-18T14_48_15_391Z-debug.log

【问题讨论】:

    标签: npm node-modules node-webkit


    【解决方案1】:

    根据this answer,问题出在代理配置上。您需要正确设置 NPM 代理配置:

    npm config set proxy http://yourproxyaddress:port
    npm config set https-proxy http://yourproxyaddress:port
    npm config set strict-ssl false
    

    完整的讨论可以在 Github 上找到:https://github.com/sass/node-sass/issues/2202

    【讨论】:

    • 我知道,我做到了。其他正确安装的软件包,如 react-router-dom、node-sass、firebase。但是这个抛出了那个错误:/
    • 然后来自您的计算机或网络提供商的某些东西阻止 npm 访问 npmjs 存储库。我认为这件事应该转发给您的系统管理员。
    猜你喜欢
    • 1970-01-01
    • 2020-05-13
    • 2021-12-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-07
    • 2023-02-12
    • 2021-07-06
    相关资源
    最近更新 更多