我正在尝试创建一个bower.json文件。
我通常会运行bower init
来创建.json文件。
现在,当我运行bower init
/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:54
throw err;
^
Error: EACCES: permission denied, open '/Users/jason.dee/.config/configstore/bower-github.json'
You don't have access to this file.
at Error (native)
at Object.fs.openSync (fs.js:634:18)
at Object.fs.readFileSync (fs.js:502:33)
at Object.create.all.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:541:32)
at Object.Module._extensions..js (module.js:550:10)
MacBook-Pro:Ang-js-starter jason.dee$
答案 0 :(得分:0)
尝试:
sudo chown -R <user>:<user> /home/<user>/.config/configstore
example =&gt; sudo chown -R prappo:prappo /home/prappo/.config/configstore
然后,
bower init
bower install <package>