首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >什么是npm错误!电码?

什么是npm错误!电码?
EN

Stack Overflow用户
提问于 2018-03-25 16:00:21
回答 2查看 12.8K关注 0票数 2

我在两种不同的npm包上都犯了同样的错误,似乎还没能弄清楚。我已经检查了this答案,并且没有任何其他服务器在运行。我还试着删除我的module_packages文件夹,清理npm cache clean,然后按照许多线程的建议使用npm i重新安装,但是我仍然得到相同的错误。

  • Windows 10 64位
  • 节点8.9.4
  • npm 5.6.0

C:\Users\hunter\Documents\vid>npm install npm install github:storj/node-libstorj --save

代码语言:javascript
复制
> storj@5.1.0 preinstall C:\Users\hunter\Documents\vid\node_modules\storj
> node ./download.js

Unable to download libstorj for platform: win32 and arch: x64
npm WARN vid@1.0.0 No repository field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! storj@5.1.0 preinstall: `node ./download.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the storj@5.1.0 preinstall 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\hunter\AppData\Roaming\npm-cache\_logs\2018-03-25T15_44_06_578Z-debug.log

任何可能导致错误的想法都是有帮助的。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2018-03-25 16:45:59

我有好消息和坏消息要告诉你。好消息首先:你的电脑万事俱备。

坏消息是:您想安装的模块与windows操作系统不兼容。查看错误消息的第一行:

代码语言:javascript
复制
Unable to download libstorj for platform: win32 and arch: x64

对于GitHub上的这个问题,已经有一个悬而未决的问题,请参阅:https://github.com/Storj/node-libstorj/issues/43

正如在这个问题中提到的,有许多问题:

  • 下载/解压缩不工作
  • 不编译是因为使用了一些linux专用函数(访问函数)。
  • 没有链接(似乎是荨麻和其他链接失败)

因此,您有两个选择:等待此问题得到解决或切换您的操作系统;)

票数 3
EN

Stack Overflow用户

发布于 2020-06-29 12:54:43

我收到了一个“代码ELIFECYCLE”错误,试图通过package.json中的脚本条目运行"usemin“和"imagemin”节点模块。这些脚本条目是在一个课程中提供的“完整堆栈开发人员”课程:"imagemin img/* -o dist/img/ && usemin“:"usemin index.html -d dist -o dist/index.html",

第一行应改为:"imagemin -out-dir=dist/img/ img/**/*.{png,jpg,git}“

而usemin给出“代码ELIFECYLE”错误的问题最终被追溯到我已经安装了API版本("npm安装usemin")而不是cli版本("npm install usemin-cli“)。

希望上面的这些能帮助其他一些小傻瓜避免那些现在看起来很明显的错误!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49477845

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档