V
V
vasIvas2015-11-22 13:01:11
JavaScript
vasIvas, 2015-11-22 13:01:11

Why is bower installed incorrectly?

Installed nodejs as advised in my yesterday's thread (as mentioned below), but another problem occurred.

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install nodejs
sudo apt-get install build-essential

Now I don't have bower installed correctly. What am I doing -
sudo npm install --save-dev --global bower
cd Рабочий\ стол/
sudo mkdir bower-test
cd bower-test

then
sudo bower init
output

bower ESUDO Cannot be run with sudo
Additional error details:
Since bower is a user command, there is no need to execute it with superuser permissions.
If you're having permission errors when using bower without sudo, please spend a few minutes learning more about how your system should work and make any necessary repairs.
www.joyent.com/blog/installing-node-and-npm
https://gist.github.com/isaacs/579814
You can however run a command with sudo using --allow-root option

then
bower init
output
Error: EACCES, permission denied '/home/ivan/.config/configstore/bower-github.yml'
You don't have access to this file.
at Object.fs.openSync (evalmachine.:439:18)
at Object.fs.readFileSync (evalmachine.:290:15
) index.js:34:29)
at Object.Configstore (/usr/lib/node_modules/bower/node_modules/configstore/index.js:27:44)
at readCachedConfig (/usr/lib/node_modules/bower/lib/config. js:19:23)
at defaultConfig (/usr/lib/node_modules/bower/lib/config.js:11:12)
at Object. (/usr/lib/node_modules/bower/lib/index.js:40:32)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

What is the problem, how to fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2015-11-22
@alexey-m-ukolov

What is the problem

how to fix it?
bower.io/#install-bower

O
OnYourLips, 2015-11-22
@OnYourLips

What is the problem, how to fix it?
The problem is that this file was created by root (for example, using sudo). It is not right. You can't use sudo all the time.
You need to delete this file or change the rights to it (possibly the directory in which it is located) and run bower init again.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question