简体   繁体   中英

Bower not getting installed

I am trying to use npm to install bower (with -g or without -g) but unable to do so. The installing wheel just keeps rotating for continuously but nothing gets installed.

I tried looking for help online but nobody seems to have had this issue before.

  1. Tried npm cache clean, didn't help.
  2. Manually cleared bower folders and lock in the ~/.npm folder.

Node version -- 0.12.0 npm version -- 2.5.1 OS - Yosemite

After a really long wait, I got the following error. My internet is working and neither am I behind a proxy.

npm ERR! Darwin 14.1.0
npm ERR! argv "/Users/jayesh/.nvm/versions/node/v0.12.0/bin/node" "/Users/jayesh/.nvm/versions/node/v0.12.0/bin/npm" "install" "-g" "bower"
npm ERR! node v0.12.0
npm ERR! npm  v2.5.1
npm ERR! code ETIMEDOUT
npm ERR! errno ETIMEDOUT
npm ERR! syscall connect

npm ERR! network connect ETIMEDOUT
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/jayesh/npm-debug.log

Logs after running with verbose npm info it worked if it ends with ok npm verb cli [ '/Users/jayesh/.nvm/versions/node/v0.12.0/bin/node', npm verb cli '/Users/jayesh/.nvm/versions/node/v0.12.0/bin/npm', npm verb cli 'install', npm verb cli '-g', npm verb cli 'bower', npm verb cli '--verbose' ] npm info using npm@2.5.1 npm info using node@v0.12.0 npm verb cache add spec bower npm verb addNamed bower@* npm verb addNameRange registry: https://registry.npmjs.org/bower not in flight; fetching npm verb request uri https://registry.npmjs.org/bower npm verb request no auth needed npm info attempt registry request try #1 at 1:14:03 AM npm verb request id 42efd554bb50b061 npm verb etag "BP1YZKBGAIE38MKI0RCNK8G2H" npm http request GET https://registry.npmjs.org/bower npm http 304 https://registry.npmjs.org/bower npm verb etag https://registry.npmjs.org/bower from cache npm verb get saving bower to /Users/jayesh/.npm/registry.npmjs.org/bower/.cache.json npm verb addNamed bower@1.3.12 npm verb afterAdd /Users/jayesh/.npm/bower/1.3.12/package/package.json not in flight; writing npm verb afterAdd /Users/jayesh/.npm/bower/1.3.12/package/package.json written npm info install bower@1.3.12 into /Users/jayesh/.nvm/versions/node/v0.12.0/lib npm info installOne bower@1.3.12 npm verb installOne of bower to /Users/jayesh/.nvm/versions/node/v0.12.0/lib not in flight; installing npm WARN locking Error: EACCES, open '/Users/jayesh/.npm/_locks/bower-990c3d8ae8803e10.lock' npm WARN locking at Error (native) npm WARN locking /Users/jayesh/.npm/_locks/bower-990c3d8ae8803e10.lock failed { [Error: EACCES, open '/Users/jayesh/.npm/_locks/bower-990c3d8ae8803e10.lock'] npm WARN locking errno: -13, npm WARN locking code: 'EACCES', npm WARN locking path: '/Users/jayesh/.npm/_locks/bower-990c3d8ae8803e10.lock' } npm verb stack Error: Attempt to unlock /Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/bower, which hasn't been locked npm verb stack at unlock (/Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/locker.js:66:11) npm verb stack at cb (/Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/install.js:929:5) npm verb stack at /Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/install.js:933:20 npm verb stack at /Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/npm/lib/utils/locker.js:40:9 np m verb stack at cb (/Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/npm/node_modules/lockfile/lockfile.js:149:38) npm verb stack at /Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/npm/node_modules/lockfile/lockfile.js:177:38 npm verb stack at FSReqWrap.oncomplete (fs.js:99:15) npm verb cwd /Users/jayesh/sandeep/valueaddnew npm ERR! Darwin 14.1.0 npm ERR! argv "/Users/jayesh/.nvm/versions/node/v0.12.0/bin/node" "/Users/jayesh/.nvm/versions/node/v0.12.0/bin/npm" "install" "-g" "bower" "--verbose" npm ERR! node v0.12.0 npm ERR! npm v2.5.1

npm ERR! Attempt to unlock /Users/jayesh/.nvm/versions/node/v0.12.0/lib/node_modules/bower, which hasn't been locked
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>
npm verb exit [ 1, true ]

npm ERR! Please include the following file with any support request

You have to set correct permissions (ownership) so npm can access your directories with your own user permissions:

chown -R $USER <directory>

where in your case <directory> is /Users/jayesh .

See here for more details .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM