Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 使用NPM安装包会导致依赖项循环_Node.js_Npm_Osx Mavericks_Bower - Fatal编程技术网

Node.js 使用NPM安装包会导致依赖项循环

Node.js 使用NPM安装包会导致依赖项循环,node.js,npm,osx-mavericks,bower,Node.js,Npm,Osx Mavericks,Bower,基本信息: System: OS X 10.9.2 Npm version: 1.4.9 Node version: v0.10.28 Ruby Version : ruby ​2.1.1p76 ( 2/24/2014 Revision 45161 ) [ x86_64- darwin12.0 ] 发生的情况是,当我运行npm install-g bower或sudo nom install-g命令时,或者bower变成一个有错误但未完成的循环,执行回滚并重新启动(我猜) 也碰巧被设置为下载其

基本信息:

System: OS X 10.9.2
Npm version: 1.4.9
Node version: v0.10.28
Ruby Version : ruby ​2.1.1p76 ( 2/24/2014 Revision 45161 ) [ x86_64- darwin12.0 ]
发生的情况是,当我运行
npm install-g bower
sudo nom install-g
命令时,或者bower变成一个有错误但未完成的循环,执行回滚并重新启动(我猜)

也碰巧被设置为下载其他依赖项,例如
karma
mocha
chai
(我不知道是否会是
bower
的依赖项),但问题不仅在于此,而且还碰巧尝试安装任何依赖项检查:
yeoman
grunt
,等等

我尝试了以下命令,但问题仍然存在:

npm cache clean
npm cache clear
这是一个part-debug.log npm文件:

32016 verbose etag " 9CS1TTNJ9VSLF7WEYXSRZ8EMQ "
32017 http GET https://registry.npmjs.org/grunt-contrib-jshint
32018 gunzTarPerm extractEntry silly example / test / test- example.js
32019 gunzTarPerm extractEntry silly lib / main.js
32020 gunzTarPerm extractEntry silly lib / tap -browser- harness.js
32021 gunzTarPerm extractEntry silly lib / tap- consumer.js
32022 gunzTarPerm extractEntry silly lib / tap -cov - html.js
32023 gunzTarPerm extractEntry silly lib / tap- assert.js
32024 gunzTarPerm extractEntry silly lib / tap- harness.js
32025 gunzTarPerm extractEntry silly lib / tap- producer.js
32026 gunzTarPerm extractEntry silly lib / tap- results.js
32027 gunzTarPerm extractEntry silly lib / tap- runner.js
32028 gunzTarPerm extractEntry silly lib / tap- test.js
32029 gunzTarPerm extractEntry silly lib / tap -global- harness.js
32030 gunzTarPerm silly extractEntry AUTHORS
32031 gunzTarPerm silly extractEntry coverage-example/lib/bar.js
32032 gunzTarPerm silly extractEntry coverage-example/lib/foo.js
32033 gunzTarPerm silly extractEntry coverage-example/test/bar.test.js
32034 gunzTarPerm silly extractEntry coverage-example/test/baz.test.js
32035 gunzTarPerm silly extractEntry coverage-example/test/foo.test.js
32036 gunzTarPerm silly extractEntry bin / tap- http.js
32037 gunzTarPerm silly extractEntry bin / tap- reader.js
32038 gunzTarPerm silly extractEntry bin / tap.js
32039 gunzTarPerm extractEntry silly test / buffer_compare.js
32040 gunzTarPerm extractEntry silly test / expose- gc- test.js
32041 gunzTarPerm extractEntry silly test / independent- timeouts.js
32042 gunzTarPerm extractEntry silly test / isolated- conf- test.js
32043 gunzTarPerm extractEntry silly test / meta- test.js
32044 gunzTarPerm extractEntry silly test / timeout.js
32045 gunzTarPerm extractEntry silly test / common.js
32046 gunzTarPerm extractEntry silly test / test- test.js
32047 gunzTarPerm extractEntry silly test / output- childtest - description.js
32048 gunzTarPerm extractEntry silly test / result - trap.js
32049 gunzTarPerm extractEntry silly test / segv.js
32050 extractEntry test gunzTarPerm silly / trivial - success.js
32051 gunzTarPerm extractEntry silly test / single - test- harness- with- plan.js
32052 gunzTarPerm extractEntry silly test / deep.js
32053 gunzTarPerm extractEntry silly test / single - harness- test.js
32054 gunzTarPerm extractEntry silly test / nested- test.js
32055 gunzTarPerm extractEntry silly test / undefined_indented.js
32056 gunzTarPerm extractEntry silly test / non -tap- output.js
32057 gunzTarPerm extractEntry silly test / not- executed.sh
32058 gunzTarPerm extractEntry silly test / executed.sh
32059 gunzTarPerm extractEntry silly test / end -exception / t.js
32060 gunzTarPerm silly extractEntry test-disabled/bailout.js
32061 gunzTarPerm silly extractEntry test-disabled/foo.js
32062 gunzTarPerm silly extractEntry test-disabled/t.js
32063 gunzTarPerm silly extractEntry node_modules / inherits / package.json
32064 gunzTarPerm silly extractEntry node_modules / inherits / README.md
32065 gunzTarPerm silly extractEntry node_modules / inherits / LICENSE
32066 gunzTarPerm silly extractEntry node_modules / inherits / inherits - old.js
32067 gunzTarPerm silly extractEntry node_modules / inherits / inherits.js
32068 gunzTarPerm silly extractEntry node_modules / yamlish / package.json
32069 gunzTarPerm silly extractEntry node_modules / yamlish / README.md
32070 gunzTarPerm silly extractEntry node_modules / yamlish / LICENSE
32071 gunzTarPerm silly extractEntry node_modules / yamlish / yamlish.js
32072 gunzTarPerm extractEntry silly . Travis.yml
32073 gunzTarPerm silly extractEntry History.md
32074 gunzTarPerm extractEntry silly example / defined.js
32075 gunzTarPerm modified silly mode [ ' example / defined.js ' , 438, 420]
32076 gunzTarPerm silly extractEntry readme.markdown
32077 gunzTarPerm modified silly mode [ ' readme.markdown ' , 438, 420]
Http 32078 200 https://registry.npmjs.org/should/-/should-1.2.2.tgz
304 32079 http https://registry.npmjs.org/tape
32080 registry.get silly cb [ 304,
32080 silly registry.get {date : ' Fri, 09 May 2014 1:25:21 GMT '
32080 silly registry.get server: ' Apache '
32080 registry.get silly via: '1 .1 varnish '
32080 registry.get silly ' last-modified ': ' Fri, 09 May 2014 1:25:21 GMT '
32080 registry.get silly ' cache-control ' : 'max -age = 1',
32080 registry.get silly etag ' " NOJCHGNZ4V3LSB5NIN9NV95R '"
32080 registry.get silly ' x -served -by ' , ' cache- am69 -AMS '
32080 registry.get silly ' x -cache' , ' HIT ' ,
32080 registry.get silly ' x -cache- hits' : '1'
32080 registry.get silly 'x- timer' , ' S1399598721.296903610 , VS0 , VE186 '
32080 registry.get silly vary : 'Accept' ,
32080 registry.get silly 'content - length' : '0 ' ,
32080 registry.get silly ' keep- alive' , ' timeout = 10 , max = 50',
32080 registry.get silly connection : ' Keep- Alive '} ]
32081 verbose etag cache from tape
257f9ab3 silly lockfile - 32082 -2- lodash 4-1 lodash @ ~ 2.4.1
257f9ab3 silly lockfile - 32083 -2- lodash 4-1 lodash @ ~ 2.4.1
32084 gunzTarPerm extractEntry silly example / prof.js
32085 gunzTarPerm extractEntry silly example / top /
32086 gunzTarPerm extractEntry silly example / top / run.js
32087 gunzTarPerm extractEntry silly test / _files / inverted_section.js
以下是我在安装任何依赖项的过程中所犯的一些错误:

npm ERR ! Error: ENOENT , open '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-internal/CONTRIBUTING.md'
npm ERR ! If you need help , you report this May * Entire * log ,
npm ERR ! including the npm and node versions , at:
npm ERR ! <http://github.com/npm/npm/issues>

npm ERR ! Darwin 13.1.0 System
npm ERR ! command " node" " / usr / local / bin / npm " "install" "-g " " bower "
npm ERR ! cwd / Users / joseapl / Sites
npm ERR ! node- v v0.10.28
npm ERR ! npm - v 1.4.9
npm ERR ! path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-internal/CONTRIBUTING.md
npm ERR ! code ENOENT
npm ERR ! errno 34
npm ERR ! Error: ENOENT , lstat '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-nodeunit/Gruntfile.js'
npm ERR ! If you need help , you report this May * Entire * log ,
npm ERR ! including the npm and node versions , at:
npm ERR ! <http://github.com/npm/npm/issues>

npm ERR ! Darwin 13.1.0 System
npm ERR ! command " node" " / usr / local / bin / npm " "install" "-g " " bower "
npm ERR ! cwd / Users / joseapl / Sites
npm ERR ! node- v v0.10.28
npm ERR ! npm - v 1.4.9
npm ERR ! path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-nodeunit/Gruntfile.js
npm ERR ! fstream_path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-nodeunit/Gruntfile.js
npm ERR ! File fstream_type
npm ERR ! FileWriter fstream_class
npm ERR ! code ENOENT
npm ERR ! errno 34
npm ERR ! fstream_stack / usr / local / lib / node_modules / npm / node_modules / fstream / lib / writer.js : 284:26
npm ERR ! fstream_stack Object.oncomplete ( fs.js : 107:15 )
npm ERR ! Error: ENOENT , lstat '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/istanbul/test/instrumentation/test-for.js'
npm ERR ! If you need help , you report this May * Entire * log ,
npm ERR ! including the npm and node versions , at:
npm ERR ! <http://github.com/npm/npm/issues>

npm ERR ! Darwin 13.1.0 System
npm ERR ! command " node" " / usr / local / bin / npm " "install" "-g " " bower "
npm ERR ! cwd / Users / joseapl / Sites
npm ERR ! node- v v0.10.28
npm ERR ! npm - v 1.4.9
npm ERR ! path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/istanbul/test/instrumentation/test-for.js
npm ERR ! fstream_path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/istanbul/test/instrumentation/test-for.js
npm ERR ! File fstream_type
npm ERR ! FileWriter fstream_class
npm ERR ! code ENOENT
npm ERR ! errno 34
npm ERR ! fstream_stack / usr / local / lib / node_modules / npm / node_modules / fstream / lib / writer.js : 284:26
npm ERR ! fstream_stack Object.oncomplete ( fs.js : 107:15 )
npm ERR ! Error: ENOENT , lstat '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-jshint/tasks/jshint.js'
npm ERR ! If you need help , you report this May * Entire * log ,
npm ERR ! including the npm and node versions , at:
npm ERR ! <http://github.com/npm/npm/issues>

npm ERR ! Darwin 13.1.0 System
npm ERR ! command " node" " / usr / local / bin / npm " "install" "-g " " bower "
npm ERR ! cwd / Users / joseapl / Sites
npm ERR ! node- v v0.10.28
npm ERR ! npm - v 1.4.9
npm ERR ! path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-jshint/tasks/jshint.js
npm ERR ! fstream_path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/grunt-contrib-jshint/tasks/jshint.js
npm ERR ! File fstream_type
npm ERR ! FileWriter fstream_class
npm ERR ! code ENOENT
npm ERR ! errno 34
npm ERR ! fstream_stack / usr / local / lib / node_modules / npm / node_modules / fstream / lib / writer.js : 284:26
npm ERR ! fstream_stack Object.oncomplete ( fs.js : 107:15 )
npm http GET https://registry.npmjs.org/mocha/-/mocha-1.8.0.tgz
npm ERR ! Error rolling back Error: ENOTEMPTY , rmdir '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/tiny-lr'
npm ERR ! Error rolling back decompress-zip@0.0.6 { [Error : ENOTEMPTY , rmdir '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/tiny-lr']
npm ERR ! Error rolling back errno : 53,
npm ERR ! rolling back the error code: ' ENOTEMPTY '
npm ERR ! Error rolling back path: '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/tiny-lr' }
npm ERR ! Error: ENOENT , lstat '/usr/local/lib/node_modules/bower/node_modules/decompress-zip/node_modules/grunt-contrib-watch/node_modules/gaze/test/add_test.js'
npm ERR ! If you need help , you report this May * Entire * log ,
npm ERR ! including the npm and node versions , at:
npm ERR ! <http://github.com/npm/npm/issues>
npm错误!错误:enoint,打开“/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib internal/contribution.md”
npm错误!如果您需要帮助,请报告此May*完整*日志,
npm错误!包括npm和节点版本,位于:
npm错误!
npm错误!达尔文13.1.0系统
npm错误!命令“node”“/usr/local/bin/npm”“install”“-g”“bower”
npm错误!cwd/用户/JOSEPL/站点
npm错误!节点-v v0.10.28
npm错误!npm-V1.4.9
npm错误!path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib internal/contribution.md
npm错误!代码eNONT
npm错误!埃尔诺34
npm错误!错误:enoint,lstat'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib nodeunit/Gruntfile.js'
npm错误!如果您需要帮助,请报告此May*完整*日志,
npm错误!包括npm和节点版本,位于:
npm错误!
npm错误!达尔文13.1.0系统
npm错误!命令“node”“/usr/local/bin/npm”“install”“-g”“bower”
npm错误!cwd/用户/JOSEPL/站点
npm错误!节点-v v0.10.28
npm错误!npm-V1.4.9
npm错误!path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib nodeunit/grunfile.js
npm错误!fstream_path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib nodeunit/Gruntfile.js
npm错误!文件类型
npm错误!FileWriter fstream_类
npm错误!代码eNONT
npm错误!埃尔诺34
npm错误!fstream_stack/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm错误!fstream_stack Object.oncomplete(fs.js:107:15)
npm错误!错误:enoint,lstat'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/伊斯坦布尔/test/instrumentation/test for.js'
npm错误!如果您需要帮助,请报告此May*完整*日志,
npm错误!包括npm和节点版本,位于:
npm错误!
npm错误!达尔文13.1.0系统
npm错误!命令“node”“/usr/local/bin/npm”“install”“-g”“bower”
npm错误!cwd/用户/JOSEPL/站点
npm错误!节点-v v0.10.28
npm错误!npm-V1.4.9
npm错误!path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/伊斯坦布尔/test/instrumentation/test-for.js
npm错误!fstream_path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/伊斯坦布尔/test/instrumentation/test-for.js
npm错误!文件类型
npm错误!FileWriter fstream_类
npm错误!代码eNONT
npm错误!埃尔诺34
npm错误!fstream_stack/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm错误!fstream_stack Object.oncomplete(fs.js:107:15)
npm错误!错误:enoint,lstat'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib jshint/tasks/jshint.js'
npm错误!如果您需要帮助,请报告此May*完整*日志,
npm错误!包括npm和节点版本,位于:
npm错误!
npm错误!达尔文13.1.0系统
npm错误!命令“node”“/usr/local/bin/npm”“install”“-g”“bower”
npm错误!cwd/用户/JOSEPL/站点
npm错误!节点-v v0.10.28
npm错误!npm-V1.4.9
npm错误!path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib jshint/tasks/jshint.js
npm错误!fstream_path/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/grunt contrib jshint/tasks/jshint.js
npm错误!文件类型
npm错误!FileWriter fstream_类
npm错误!代码eNONT
npm错误!埃尔诺34
npm错误!fstream_stack/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm错误!fstream_stack Object.oncomplete(fs.js:107:15)
npm http GEThttps://registry.npmjs.org/mocha/-/mocha-1.8.0.tgz
npm错误!回滚错误时出错:enotery,rmdir'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/tiny lr'
npm错误!回滚解压缩时出错-zip@0.0.6{[Error:enotery,rmdir'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/tiny lr']
npm ERR!回滚错误号:53,
npm ERR!正在回滚错误代码:“Enotenty”
npm ERR!回滚路径时出错:'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/tiny lr'}
npm错误!错误:enoint,lstat'/usr/local/lib/node_modules/bower/node_modules/decompresszip/node_modules/grunt contrib watch/node_modules/gaze/test/add_test.js'
npm错误!如果您需要帮助,请报告此May*完整*日志,
npm错误!包括npm和节点版本,位于:
npm错误!
这是否与Xcode
版本5.1.1(5B1008)
和命令行工具有关

当我在中运行
npm时会发生什么
npm install -g bower
sudo npm install -g bower
sudo su -
npm install -g bower
sudo chown -R $USER ~/.npm
sudo chown -R $USER /usr/local