【问题标题】:Bower install issueBower 安装问题
【发布时间】:2017-01-11 14:18:58
【问题描述】:

使用 Bower 添加软件包时,每次我不知道如何解决问题时都会收到此错误消息?

我试图通过这样做来加载字体真棒或凉亭安装

$ bower install --save font-awesome
$ bower install

但我收到此错误:

usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
                throw err;
                ^
    Error: EACCES: permission denied, open '/Users/brandonpowell/.config/configstore/bower-github.json'
    You don't have access to this file.

        at Error (native)
        at Object.fs.openSync (fs.js:640:18)
        at Object.fs.readFileSync (fs.js:508:33)
        at Object.get (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
        at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
        at readCachedConfig (/usr/local/lib/node_modules/bower/lib/config.js:19:23)
        at defaultConfig (/usr/local/lib/node_modules/bower/lib/config.js:11:12)
        at Object.<anonymous> (/usr/local/lib/node_modules/bower/lib/index.js:16:32)
        at Module._compile (module.js:556:32)
        at Object.Module._extensions..js (module.js:565:10)

【问题讨论】:

    标签: command-line bower bower-install


    【解决方案1】:

    检查该文件的权限:

    ls -laF ~/.config/configstore/bower-github.json
    

    您之前可能以root 用户的身份运行过bower。运行应该足够了:

    sudo chown brandonpowell ~/.config/configstore/bower-github.json
    

    【讨论】:

    • 说的是非法组名
    • 是的,对不起。我只是在猜测主要组名。但是没有必要更改组。我已经更新了答案。
    猜你喜欢
    • 2015-02-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-02
    • 2015-03-05
    • 2014-07-21
    • 2014-03-04
    相关资源
    最近更新 更多