I am installing bower
using the following command...
sudo npm install -g bower
and get the following...
npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower
/usr/local/bin/bower -> /usr/local/lib/node_modules/bower/bin/bower
bower@1.7.7 /usr/local/lib/node_modules/bower
I believe Bower to have been installed successfully using NPM
.
I then run the following to install an Angular timer...
bower install angular-timer
And get the following error ridden traceback...
Error: EACCES, permission denied '/home/alopex/.config/configstore/bower-github.yml'
You don't have access to this file.
at Object.fs.openSync (evalmachine.<anonymous>:432:18)
at Object.fs.readFileSync (evalmachine.<anonymous>:286:15)
at Object.create.all.get (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:34:29)
at Object.Configstore (/usr/local/lib/node_modules/bower/lib/node_modules/configstore/index.js:27: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:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
I would try to just use sudo
, but I know from looking around Stack Overflow and the Bower site that Bower is not made to be run using sudo
. How can I solve this predicament?
First do the following.
sudo bower install --allow-root
Then run the following in terminal
bower install
Sometimes it shows error even if all the packages included in the bower.json file is successfully installed.
Usually bower is installed locally in your project directory and does not need root access.
cheers!
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.