简体   繁体   中英

EACCES: permission denied, open

bower EACCES        EACCES: permission denied, open '/home/caner/.cache/bower/packages/e5ec1b46386aa59c822f27e340f7ab5b-1.5.8.lock'

Stack trace:
Error: EACCES: permission denied, open '/home/caner/.cache/bower/packages/e5ec1b46386aa59c822f27e340f7ab5b-1.5.8.lock'
    at Error (native)

Console trace:
Error
    at StandardRenderer.error (/home/caner/.npm-global/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
    at Logger.<anonymous> (/home/caner/.npm-global/lib/node_modules/bower/lib/bin/bower.js:110:26)
    at emitOne (events.js:90:13)
    at Logger.emit (events.js:182:7)
    at Logger.emit (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/bower-logger/lib/Logger.js:29:39)
    at /home/caner/.npm-global/lib/node_modules/bower/lib/commands/index.js:48:20
    at _rejected (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:844:24)
    at /home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:870:30
    at Promise.when (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:1122:31)
    at Promise.promise.promiseDispatch (/home/caner/.npm-global/lib/node_modules/bower/lib/node_modules/q/q.js:788:41)
System info:
Bower version: 1.7.9
Node version: 5.12.0
OS: Linux 4.4.0-38-generic x64

i got this error when i try to install bower with

bower pdate

i tried lots of things.

bower init chown

but did not work

i first installed npm then try to install bower.

i did most of those

https://www.google.com.tr/search?q=Error%3A+EACCES%3A+permission+denied%2C+open+%27%2F%2Fbower-github.json%27&oq=Error%3A+EACCES%3A+permission+denied%2C+open+%27%2F%2Fbower-github.json%27&aqs=chrome..69i57j69i58.3505j0j4&sourceid=chrome&ie=UTF-8

but not working.

what can be reason?

what i want to do is

   npm install
npm install -g bower (no need if you have installed bower)
bower install
bower prune
bower update
npm install -g gulp (no need if you have installed gulp)
gulp install

in a project directory

Remove .cache folder first, I guess that .cache folder created with different permissions, it happens when You play with sudo and etc.

So run this:

sudo rm -rf /home/caner/.cache

and after that run Your commands again

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