首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用ENOENT的Mac npm错误

使用ENOENT的Mac npm错误
EN

Stack Overflow用户
提问于 2013-03-19 01:05:14
回答 2查看 8.5K关注 0票数 7

我最近从Windows转到了Mac,目前正在尝试设置我的工具。

我第一次使用homebrew安装node,它给了我错误(和我现在仍然有的一样)。我后来使用homebrew删除了node,并使用node网站上的pkg进行了安装。

我可以在命令行和npm中访问node。问题是,当我尝试在本地项目上安装模块时,我得到的结果如下:

npm install grunt-contrib

代码语言:javascript
复制
Error extracting archive { [Error: ENOENT, open '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip']
  errno: 34,
  code: 'ENOENT',
  path: '/Users/davidmckeown/dev/adt-com/node_modules/grunt-contrib/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs/tmp/phantomjs-1.7.0-macosx.zip' }

上面的另一条消息包含:

代码语言:javascript
复制
npm ERR! phantomjs@0.2.6 install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 8
npm ERR!
npm ERR! Failed at the phantomjs@0.2.6 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls phantomjs
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 12.2.1
npm ERR! command "node" "/usr/local/bin/npm" "install" "grunt-contrib"
npm ERR! cwd /Users/davidmckeown/dev/adt-com
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE

任何帮助找出是什么导致了这里的问题将是奇妙的。据我所知,其他模块也会发生这种情况。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-06-26 23:47:09

npm cache clean

sudo npm cache clean

票数 27
EN

Stack Overflow用户

发布于 2013-05-11 04:00:29

5个月前grunt qunit package - https://github.com/gruntjs/grunt-lib-phantomjs/issues/5出现了一个问题。

尝试安装此特定程序包:

sudo npm install grunt-contrib-qunit

您安装的包是许多包的捆绑包。qunit包版本没有明确地更新到这个包中的最新版本,这就是为什么清除npm缓存可能会解决这个问题。

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

https://stackoverflow.com/questions/15482658

复制
相关文章

相似问题

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