当前位置: 首页 > 知识库问答 >
问题:

安装节点包时出错

商华藏
2023-03-14
npm install grunt-contrib-imagemin -g
...
npm http 304 http://registry.npmjs.org/cryptiles
npm http 304 http://registry.npmjs.org/graceful-fs

> gifsicle@0.1.4 postinstall /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/gifsicle
> node lib/check.js


events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connect ECONNREFUSED
    at errnoException (net.js:901:11)
    at Object.afterConnect [as oncomplete] (net.js:892:19)

> optipng-bin@0.3.1 postinstall /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/optipng-bin
> node lib/check.js



module.js:340
    throw err;
          ^
Error: Cannot find module 'json-stringify-safe'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object. (/usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/optipng-bin/node_modules/bin-wrapper/node_modules/download/node_modules/request/request.js:19:22)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random'
File exists: /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random
Move it away, and try again. 
npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib-imagemin" "-g"
npm ERR! cwd /Users/dmitrizaitsev/Dropbox/Priv/APP
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! path /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random
npm ERR! fstream_path /usr/local/lib/node_modules/grunt-contrib-imagemin/node_modules/image-min/node_modules/jpegtran-bin/node_modules/bin-wrapper/node_modules/mout/random/randInt.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code EEXIST
npm ERR! errno 47
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! gifsicle@0.1.4 postinstall: `node lib/check.js`
npm ERR! Exit status 8
npm ERR! 
npm ERR! Failed at the gifsicle@0.1.4 postinstall script.
npm ERR! This is most likely a problem with the gifsicle package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node lib/check.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls gifsicle
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.5.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib-imagemin" "-g"
npm ERR! cwd /Users/dmitrizaitsev/Dropbox/Priv/APP
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/dmitrizaitsev/Dropbox/Priv/APP/npm-debug.log
npm ERR! not ok code 0

共有1个答案

姬雪松
2023-03-14

国家预防机制不时出现问题。它为很多请求提供服务。今日示例:https://twitter.com/peteromano/status/423506485188911105

不管是什么引起的,也可能引起了你的问题。你最近又试过了吗?

编辑:修正了一个错误

 类似资料:
  • 我在尝试安装python包时遇到此错误: 错误:由于环境错误无法安装包:HTTPSConnectionpool(host='files.pythonhosted.org',port=443):最大重试超过了url: /packages/f2/12/37c09c37d7ac2bdb6169d5b9409a8e64770a997412edcccc689115d63b97/catboost-0.16-c

  • 我使用npm很长一段时间了(使用Win10)-在防火墙/权限等方面没有改变任何东西,突然间我在尝试安装任何软件包时出现以下错误: C:\udemy-button>npm安装引导程序--保存npm错误!路径C:\udemy-button\node_modules\fsevents\node_modules\aws4\package.json npm err!代码EPERM npm错误!错误-4048

  • 我是新来的节点,有点超出我的深度。在Mac OS X和Centos 6上都遇到此错误。发生在我尝试过的所有npm install xxx命令中。任何关于如何避免这一错误的建议都将不胜感激。 类似于npm,安装时会出现节点gyp错误,但我的用户名中没有空格,这就解决了他的问题。

  • 使用第2版。0@dev对于yiisoft/yii2-jui/创作者json已在加载composer存储库时更新,其中包含包信息更新依赖项(包括require dev) 拿不到https://api.github.com/repos/jquery/jquery,输入您的GitHub凭据以超过API速率限制将创建令牌并将其存储在“C:/Users/nimmy/AppData/Roaming/Compo

  • 我正在尝试在R 3.3.2(Ubuntu 14.04 LTS)中安装flowCore包(Bioconductor 3.4)。但我遇到了以下错误。有谁能提出一些解决方案吗?谢谢。

  • 我试图在Windows7中为Python3.4安装一个图表工具(Matplotlib-V1.4.2),但到目前为止,我的所有尝试似乎都无法完成这一工作。 尝试: 我已从GitHub下载了pip -不使用 这里有一个类似的问题,我也尝试了这些建议,但我得到了以下错误 我肯定我错过了什么,你的一步一步的指导在这方面将非常感谢。