简体   繁体   中英

how to get a permission to execute bower install jquery

This is My CLI after installing node.js and bower

Xxxxxxx-MacBook-Pro:gumbyFor xxxxxxx$ bower install jquery
    bower EACCES       
          EACCES, open '/Users/xxxxxxxx/.cache/bower/registry/bower.herokuapp.com/lookup/jquery_d223e'

    Stack trace:
    Error: EACCES, open '/Users/xxxxxxxx/.cache/bower/registry/bower.herokuapp.com/lookup/jquery_d223e'

    Console trace:
    Trace
        at StandardRenderer.error (/usr/local/lib/node_modules/bower/lib/renderers/StandardRenderer.js:74:17)
        at Logger.updateNotifier.packageName (/usr/local/lib/node_modules/bower/bin/bower:109:18)
        at Logger.EventEmitter.emit (events.js:95:17)
        at Logger.emit (/usr/local/lib/node_modules/bower/node_modules/bower-logger/lib/Logger.js:29:39)
        at /usr/local/lib/node_modules/bower/lib/commands/install.js:27:16
        at _rejected (/usr/local/lib/node_modules/bower/node_modules/q/q.js:808:24)
        at /usr/local/lib/node_modules/bower/node_modules/q/q.js:834:30
        at Promise.when (/usr/local/lib/node_modules/bower/node_modules/q/q.js:1079:31)
        at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/bower/node_modules/q/q.js:752:41)
        at /usr/local/lib/node_modules/bower/node_modules/q/q.js:574:44

    System info:
    Bower version: 1.2.8
    Node version: 0.10.22
    OS: Darwin 13.0.0 x64

how can I get the permission to install it because i have tried with : sudo bower install jquery and sudo bower cache clean --allow-root it's still not working

tl;dr - Bower doesn't seem to be cleaning up after itself once installation is complete.

It's possible that you're encountering this issue: multi-user use fails due to permissions of /tmp/bower .

Although the issue was closed, it appears at least some users are still encountering it :

The same error persists in bower 1.2.8

System info: Bower version: 1.2.8 Node version: 0.10.22 OS: Linux 3.8.0-29-generic x64

Try clearing ~/.cache/bower manually to see if it resolves your issue.

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