gpt4 book ai didi

node.js - Bower 的麻烦 - Node.js

转载 作者:太空宇宙 更新时间:2023-11-03 22:34:21 25 4
gpt4 key购买 nike

我正在使用 Node.js 开发我的第一个 Web 应用程序。我在尝试安装 Bower 时遇到了一些问题。

User@Users-MacBook-Pro-2 my-application (master) $ npm install -g bower
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower
npm ERR! error rolling back Error: EACCES, unlink '/usr/local/lib/node_modules/bower/node_modules'
npm ERR! error rolling back bower@1.3.5 { [Error: EACCES, unlink '/usr/local/lib/node_modules/bower/node_modules']
npm ERR! error rolling back errno: 3,
npm ERR! error rolling back code: 'EACCES',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/bower/node_modules' }
npm ERR! Error: EACCES, unlink '/usr/local/lib/node_modules/bower/node_modules'
npm ERR! { [Error: EACCES, unlink '/usr/local/lib/node_modules/bower/node_modules']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/bower/node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/usr/local/lib/node_modules/bower/node_modules'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/User/workspace/my-application/npm-debug.log
npm ERR! not ok code 0
User@Users-MacBook-Pro-2 my-application (master) $
I've tried using sudo (which of course is not the optimal solution), but that doesn't solve the problem for me. I've also searched around for other solutions (Bower Installation Errors), but nothing has worked so far. Does anyone know how I can solve this issue?

Thanks for your time!

--EDIT-- Using sudo I get the following:

User@Users-MacBook-Pro-2 my-application (master) $ sudo npm install -g bower
Password:
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/abbrev
npm http GET https://registry.npmjs.org/bower-config
npm http GET https://registry.npmjs.org/archy
npm http GET https://registry.npmjs.org/bower-endpoint-parser
npm http GET https://registry.npmjs.org/bower-logger
npm http GET https://registry.npmjs.org/bower-json
npm http GET https://registry.npmjs.org/bower-registry-client
npm http GET https://registry.npmjs.org/chalk
npm http GET https://registry.npmjs.org/cardinal
npm http GET https://registry.npmjs.org/chmodr
npm http GET https://registry.npmjs.org/decompress-zip
npm http GET https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/glob
npm http GET https://registry.npmjs.org/fstream-ignore
npm http GET https://registry.npmjs.org/graceful-fs
npm http GET https://registry.npmjs.org/handlebars
npm http GET https://registry.npmjs.org/inquirer
npm http GET https://registry.npmjs.org/insight
npm http GET https://registry.npmjs.org/is-root
npm http GET https://registry.npmjs.org/junk
npm http GET https://registry.npmjs.org/lru-cache
npm http GET https://registry.npmjs.org/lockfile
npm http GET https://registry.npmjs.org/mkdirp
npm http GET https://registry.npmjs.org/mout
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/opn
npm http GET https://registry.npmjs.org/osenv
npm http GET https://registry.npmjs.org/p-throttler
npm http GET https://registry.npmjs.org/promptly
npm http GET https://registry.npmjs.org/retry
npm http GET https://registry.npmjs.org/q
npm http GET https://registry.npmjs.org/request
npm http GET https://registry.npmjs.org/request-progress
npm http GET https://registry.npmjs.org/rimraf
npm http GET https://registry.npmjs.org/shell-quote
npm http GET https://registry.npmjs.org/semver
npm http GET https://registry.npmjs.org/stringify-object
npm http GET https://registry.npmjs.org/tar
npm http GET https://registry.npmjs.org/tmp
npm http GET https://registry.npmjs.org/update-notifier
npm http GET https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/abbrev
npm http 304 https://registry.npmjs.org/bower-config
npm http 304 https://registry.npmjs.org/archy
npm http 304 https://registry.npmjs.org/bower-logger
npm http 304 https://registry.npmjs.org/bower-endpoint-parser
npm http 304 https://registry.npmjs.org/bower-json
npm http 304 https://registry.npmjs.org/bower-registry-client
npm http 304 https://registry.npmjs.org/cardinal
npm http 304 https://registry.npmjs.org/chalk
npm http 304 https://registry.npmjs.org/chmodr
npm http 304 https://registry.npmjs.org/glob
npm http 304 https://registry.npmjs.org/fstream-ignore
npm http 304 https://registry.npmjs.org/graceful-fs
npm http 304 https://registry.npmjs.org/handlebars
npm http 304 https://registry.npmjs.org/inquirer
npm http 304 https://registry.npmjs.org/insight
npm http 304 https://registry.npmjs.org/junk
npm http 304 https://registry.npmjs.org/lru-cache
npm http 304 https://registry.npmjs.org/mkdirp
npm http 304 https://registry.npmjs.org/lockfile
npm http 304 https://registry.npmjs.org/decompress-zip
npm http 304 https://registry.npmjs.org/mout
npm http 304 https://registry.npmjs.org/nopt
npm http 304 https://registry.npmjs.org/opn
npm http 304 https://registry.npmjs.org/osenv
npm http 304 https://registry.npmjs.org/p-throttler
npm http 304 https://registry.npmjs.org/promptly
npm http 304 https://registry.npmjs.org/retry
npm http 304 https://registry.npmjs.org/is-root
npm http 304 https://registry.npmjs.org/q
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/request-progress
npm http 304 https://registry.npmjs.org/rimraf
npm http 304 https://registry.npmjs.org/shell-quote
npm http 304 https://registry.npmjs.org/semver
npm http 304 https://registry.npmjs.org/stringify-object
npm http 304 https://registry.npmjs.org/tar
npm http 304 https://registry.npmjs.org/tmp
npm http 304 https://registry.npmjs.org/update-notifier
npm http 304 https://registry.npmjs.org/which
npm http 304 https://registry.npmjs.org/fstream
npm http GET https://registry.npmjs.org/has-color
npm http GET https://registry.npmjs.org/ansi-styles
npm http GET https://registry.npmjs.org/strip-ansi
npm http GET https://registry.npmjs.org/configstore
npm http GET https://registry.npmjs.org/lodash.debounce
npm http GET https://registry.npmjs.org/configstore
npm http GET https://registry.npmjs.org/object-assign
npm http GET https://registry.npmjs.org/async
npm http 304 https://registry.npmjs.org/has-color
npm http 304 https://registry.npmjs.org/strip-ansi
npm http GET https://registry.npmjs.org/throttleit
npm http 304 https://registry.npmjs.org/ansi-styles
npm http 304 https://registry.npmjs.org/object-assign
npm http 304 https://registry.npmjs.org/async
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/bower/node_modules/mout/time.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/mout/time.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/mout/time.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/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 rolling back Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/bower/node_modules/.bin'
npm ERR! error rolling back bower@1.3.5 { [Error: ENOTEMPTY, rmdir '/usr/local/lib/node_modules/bower/node_modules/.bin']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: '/usr/local/lib/node_modules/bower/node_modules/.bin' }
npm ERR! Error: No compatible version found: chalk@'^0.4.0'
npm ERR! Valid install targets:
npm ERR! ["0.1.0","0.1.1","0.2.0","0.2.1","0.3.0","0.4.0"]
npm ERR! at installTargetsError (/usr/local/Cellar/node/0.10.15/lib/node_modules/npm/lib/cache.js:719:10)
npm ERR! at /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/lib/cache.js:638:10
npm ERR! at RegClient.get_ (/usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:105:14)
npm ERR! at RegClient.<anonymous> (/usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:41:12)
npm ERR! at fs.js:266:14
npm ERR! at /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:103:5
npm ERR! at Object.oncomplete (fs.js:107:15)
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/bower/node_modules/semver'
File exists: /usr/local/lib/node_modules/bower/node_modules/semver
Move it away, and try again.

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/semver
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/semver/semver.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/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/throttleit
npm ERR! Error: ENOENT, chown '/usr/local/lib/node_modules/bower/node_modules/bower-registry-client/lib/lookup.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/bower-registry-client/lib/lookup.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/bower-registry-client/lib/lookup.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chown
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:133:7
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! EEXIST, mkdir '/usr/local/lib/node_modules/bower/node_modules/tmp/test'
File exists: /usr/local/lib/node_modules/bower/node_modules/tmp/test
Move it away, and try again.

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/tmp/test
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/tmp/test/graceful.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/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/mkdirp/index.js:37:53
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/lib/extractors.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/lib/extractors.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/decompress-zip/lib/extractors.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/lodash.debounce
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/bower/node_modules/bower-json/test/test.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/bower-json/test/test.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/bower-json/test/test.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/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/inquirer/lib/prompts/checkbox.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/inquirer/lib/prompts/checkbox.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/inquirer/lib/prompts/checkbox.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/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/retry/test/integration/test-retry-operation.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/retry/test/integration/test-retry-operation.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/retry/test/integration/test-retry-operation.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/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/read
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/bower/node_modules/fstream/lib/dir-writer.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/fstream/lib/dir-writer.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/fstream/lib/dir-writer.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/configstore
npm http 304 https://registry.npmjs.org/configstore
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/bower/node_modules/request/request.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/request/request.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/request/request.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/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/q/q.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/q/q.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/q/q.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/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/uuid
npm http GET https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/lodash.isfunction
npm http GET https://registry.npmjs.org/lodash.isobject
npm http GET https://registry.npmjs.org/lodash.now
npm ERR! Error: ENOENT, lstat '/usr/local/lib/node_modules/bower/node_modules/handlebars/dist/handlebars.amd.js'
npm ERR! If you need help, you may report this log at:
npm ERR! <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR! <npm-@googlegroups.com>

npm ERR! System Darwin 13.0.0
npm ERR! command "/usr/local/Cellar/node/0.10.15/bin/node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/User/workspace/my-application
npm ERR! node -v v0.10.15
npm ERR! npm -v 1.3.5
npm ERR! path /usr/local/lib/node_modules/bower/node_modules/handlebars/dist/handlebars.amd.js
npm ERR! fstream_path /usr/local/lib/node_modules/bower/node_modules/handlebars/dist/handlebars.amd.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR! fstream_stack /usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm http 304 https://registry.npmjs.org/read
npm http 304 https://registry.npmjs.org/uuid
npm http 304 https://registry.npmjs.org/lodash.now
npm http 304 https://registry.npmjs.org/lodash.isobject
npm http GET https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/lodash.isfunction
npm http GET https://registry.npmjs.org/qs
npm http GET https://registry.npmjs.org/json-stringify-safe
npm http GET https://registry.npmjs.org/forever-agent
npm http GET https://registry.npmjs.org/tunnel-agent
npm http GET https://registry.npmjs.org/http-signature
npm http GET https://registry.npmjs.org/oauth-sign
npm http GET https://registry.npmjs.org/cookie-jar
npm http GET https://registry.npmjs.org/hawk
npm http GET https://registry.npmjs.org/aws-sign
npm http GET https://registry.npmjs.org/node-uuid
npm http GET https://registry.npmjs.org/form-data
npm http GET https://registry.npmjs.org/mime
npm http GET https://registry.npmjs.org/lodash._isnative
npm http GET https://registry.npmjs.org/lodash._objecttypes
npm http 304 https://registry.npmjs.org/mute-stream
npm http 304 https://registry.npmjs.org/qs
npm http 304 https://registry.npmjs.org/json-stringify-safe
npm http 304 https://registry.npmjs.org/forever-agent
npm http 304 https://registry.npmjs.org/tunnel-agent
npm http 304 https://registry.npmjs.org/http-signature
npm http 304 https://registry.npmjs.org/oauth-sign
npm http 304 https://registry.npmjs.org/cookie-jar
npm http 304 https://registry.npmjs.org/hawk
npm http 304 https://registry.npmjs.org/aws-sign
npm http 304 https://registry.npmjs.org/node-uuid
npm http 304 https://registry.npmjs.org/form-data
npm http 304 https://registry.npmjs.org/mime
npm http 304 https://registry.npmjs.org/lodash._isnative
npm http 304 https://registry.npmjs.org/lodash._objecttypes
npm http GET https://registry.npmjs.org/combined-stream
npm http GET https://registry.npmjs.org/asn1/0.1.11
npm http GET https://registry.npmjs.org/ctype/0.5.2
npm http GET https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/js-yaml
npm http GET https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/cryptiles
npm http GET https://registry.npmjs.org/boom
npm http GET https://registry.npmjs.org/sntp
npm http GET https://registry.npmjs.org/esprima
npm http GET https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/combined-stream
npm http 304 https://registry.npmjs.org/ctype/0.5.2
npm http 304 https://registry.npmjs.org/assert-plus/0.1.2
npm http 304 https://registry.npmjs.org/asn1/0.1.11
npm http 304 https://registry.npmjs.org/cryptiles
npm http 304 https://registry.npmjs.org/boom
npm http 304 https://registry.npmjs.org/sntp
npm http 304 https://registry.npmjs.org/argparse
npm http 304 https://registry.npmjs.org/esprima
npm http 304 https://registry.npmjs.org/hoek
npm http GET https://registry.npmjs.org/delayed-stream/0.0.5
npm http GET https://registry.npmjs.org/underscore.string
npm http GET https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/delayed-stream/0.0.5
npm http 304 https://registry.npmjs.org/underscore.string
npm http 304 https://registry.npmjs.org/underscore
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /Users/User/workspace/my-application/npm-debug.log
npm ERR! not ok code 0
User@Users-MacBook-Pro-2 my-application (master) $

我按照此处的说明更新了 Node 然而现在,npm 似乎不起作用了。每次我使用 npm 命令时,都会收到以下错误:

User@Userss-MacBook-Pro-2 my-application (master) $ sudo npm install nodejs-inherits*

module.js:340
throw err;
^
Error: Cannot find module 'abbrev'
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.<anonymous> (/usr/local/Cellar/node/0.10.15/lib/node_modules/npm/node_modules/nopt/lib/nopt.js:10:14)
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)
User@Users-MacBook-Pro-2 my-application (master) $

最佳答案

尝试卸载并更新 Node 。这对我来说是成功的。

关于node.js - Bower 的麻烦 - Node.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31728442/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com