我最近從Windows轉換到Mac,目前只是試圖讓我的工具設置。Mac npm錯誤與ENOENT
我第一次安裝使用自制軟件的節點,這給了我錯誤(和我現在一樣)。我後來使用自制軟件刪除節點,並使用節點網站中的pkg進行安裝。
我可以在命令行和npm中訪問節點。問題是,當我嘗試在項目安裝模塊本地我得到的是這樣的:
npm install grunt-contrib
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' }
略高於包含另一條消息:
npm ERR! [email protected] install: `node install.js`
npm ERR! `sh "-c" "node install.js"` failed with 8
npm ERR!
npm ERR! Failed at the [email protected] 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
任何幫助搞清楚什麼是在這裏造成問題將是太棒了。從我所知道的情況來看,這也會發生在其他模塊上。
聽起來像它可能是一個NPM緩存問題,請嘗試'NPM緩存clean' – generalhenry 2013-03-18 17:13:26
@generalhenry可惜不是,試過和sudo'ing npm安裝但沒有喜悅。 – David 2013-03-18 17:19:14
您是否檢查過npm是否試圖解壓zip文件? – travis 2013-03-18 17:57:22