繁体   English   中英

Bower初始化命令错误

[英]Bower init command error

我正在尝试Google Polymer。 成功安装了node.js,如下所示,已安装了npm和Bower。 但是,键入“ bower init cmd”时,出现以下错误:我做错了什么以及如何最好地解决此问题? 运行Mac OS X(Mav)预先感谢。

shukhratnegmatov:Polymer shukhratnegmatov$ node -v
v0.10.30
shukhratnegmatov:Polymer shukhratnegmatov$ npm -v
1.4.21
shukhratnegmatov:Polymer shukhratnegmatov$ bower -v
1.3.9
shukhratnegmatov:Polymer shukhratnegmatov$ bower init

Error: EACCES, permission denied '/Users/shukhratnegmatov/.config/configstore'
    at Object.fs.mkdirSync (fs.js:647:18)
    at Function.sync (/usr/local/lib/node_modules/bower/node_modules/mkdirp/index.js:70:13)
    at Object.create.all.get (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/configstore.js:40:13)
    at Object.Configstore (/usr/local/lib/node_modules/bower/node_modules/insight/node_modules/configstore/configstore.js:26:44)
    at new Insight (/usr/local/lib/node_modules/bower/node_modules/insight/lib/insight.js:26:34)
    at Object.setup (/usr/local/lib/node_modules/bower/lib/util/analytics.js:18:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/bower/bin/bower:72:11)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
shukhratnegmatov:Polymer shukhratnegmatov$ 

如果您遇到类似我的情况,此问题的解决方案是,由于某种原因,您的某个程序可能会删除configstore。

在这种情况下,您可以打开终端并输入:

打开用户/ [您的用户名] /。config

[您的用户名]应该是您的用户名。 我认为是shukhratnegmatov。

然后创建一个名为configstore的文件夹!

完成。

我遇到了同样的问题,只需替换“用户名”即可

    $ sudo chown username /Users/username/.config/configstore/insight-bower.yml

暂无
暂无

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

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