简体   繁体   English

如何获得执行Bower Install Jquery的权限

[英]how to get a permission to execute bower install jquery

This is My CLI after installing node.js and bower 这是安装node.js和bower之后的我的CLI

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 我如何获得安装许可,因为我尝试过: sudo bower install jquerysudo bower cache clean --allow-root它仍然无法正常工作

tl;dr - Bower doesn't seem to be cleaning up after itself once installation is complete. tl; dr-安装完成后,Bower似乎并没有清理干净。

It's possible that you're encountering this issue: multi-user use fails due to permissions of /tmp/bower . 您可能会遇到此问题: 由于/ 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 Bower 1.2.8中仍然存在相同的错误

System info: Bower version: 1.2.8 Node version: 0.10.22 OS: Linux 3.8.0-29-generic x64 系统信息:Bower版本:1.2.8节点版本:0.10.22操作系统:Linux 3.8.0-29-通用x64

Try clearing ~/.cache/bower manually to see if it resolves your issue. 尝试手动清除~/.cache/bower来查看它是否可以解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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