简体   繁体   English

错误:这可能不是 npm 的问题。 这可能是上面的附加日志输出

[英]error: this is probably not a problem with npm. This is likely additonal logging output above

C:\\Users\\Jorge\\Desktop\\space-xplorer>npm install C:\\Users\\Jorge\\Desktop\\space-xplorer>npm install

node-sass@4.11.0 install C:\\Users\\Jorge\\Desktop\\space-xplorer\\node_modules\\node-sass node scripts/install.js node-sass@4.11.0 安装 C:\\Users\\Jorge\\Desktop\\space-xplorer\\node_modules\\node-sass node scripts/install.js

Downloading binary from https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-72_binding.node Cannot download " https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-72_binding.node ":https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-72_binding.node下载二进制文件无法下载“ https://github.com/sass/node-sass/releases /download/v4.11.0/win32-x64-72_binding.node ":

HTTP error 404 Not Found HTTP 错误 404 未找到

Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, eg提示:如果您所在的位置无法访问 github.com,请尝试通过 HTTP_PROXY 设置代理,例如

  export HTTP_PROXY=http://example.com:1234

or configure npm proxy via或通过配置 npm 代理

npm ERR! npm 错误! code ELIFECYCLE npm ERR!代码 ELIFECYCLE npm ERR! errno 1 npm ERR!错误号 1 npm 错误号! node-sass@4.11.0 postinstall: node scripts/build.js npm ERR! node-sass@4.11.0 postinstall: node scripts/build.js npm ERR! Exit status 1 npm ERR!退出状态 1 npm ERR! npm ERR! npm 错误! Failed at the node-sass@4.11.0 postinstall script.在 node-sass@4.11.0 安装后脚本失败。 npm ERR! npm 错误! This is probably not a problem with npm.这可能不是 npm 的问题。 There is likely additional logging output above.上面可能有额外的日志输出。

npm ERR! npm 错误! A complete log of this run can be found in: npm ERR!可以在以下位置找到此运行的完整日志:npm ERR! C:\\Users\\Jorge\\AppData\\Roaming\\npm-cache_logs\\2020-01-23T22_44_17_513Z-debug.log C:\\Users\\Jorge\\AppData\\Roaming\\npm-cache_logs\\2020-01-23T22_44_17_513Z-debug.log

This issue is coming because of compatibility issue of node version and node sass version.这个问题是因为 node 版本和 node sass 版本的兼容性问题而出现的。

You need to downgrade node version to 10 to install node sass 4.1.0.您需要将 node 版本降级到 10 才能安装 node sass 4.1.0。 It is not compatible with version 12 of node.它与 node.js 的版本 12 不兼容。

See this discussion for the same issue.有关同一问题,请参阅此讨论。

Compatible versions are listed on the readme https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick-guide-for-minimium-support自述文件中列出了兼容版本https://github.com/sass/node-sass#supported-nodejs-versions-vary-by-release-please-consult-the-releases-page-below-is-a-quick - 最低支持指南

Following 2 lines of code will resolve this error以下 2 行代码将解决此错误

npm run build
npm start

you should ask a question and provide some explanation, not just throw an error up and expect an answer.您应该提出问题并提供一些解释,而不仅仅是抛出错误并期望得到答案。 But I've seen this before:但我以前见过这个:

Basically NPM is trying lacking a dependency for loading node-sass, and its fallback is to get the file it needs from github.基本上 NPM 试图缺少加载 node-sass 的依赖项,它的后备是从 github 获取它需要的文件。

Looks like you're behind a firewall that blocks you from direct access to github, but all you actually need is that file bindings file.看起来您位于阻止您直接访问 github 的防火墙后面,但您实际需要的只是该文件绑定文件。

You would have to have a proxy server that is allowed to access github, or download the binary file yourself.您必须有一个允许访问 github 的代理服务器,或者自己下载二进制文件。

I downgraded the node from 14.8 to 12.18.3 , but it did NOT solve the problem.我将节点从14.8降级到12.18.3 ,但没有解决问题。

but after that, as crazy as it is may sound, I deleted the package-lock.json and tried to install the package again and solved the problem.但在那之后,尽管听起来很疯狂,但我删除了package-lock.json并尝试再次安装该软件包并解决了问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM