Problem installing Bower in windows

Asked

Viewed 2,876 times

3

I installed the nodejs without problems. I ran this command and it was:

npm -v
1.4.28

Right after I try to install Bower and I can’t:

npm install -g bower

After running this command appears this: I have no idea what it is (I have installed several times on other computers and never gave this error)

Error ao installar o bower no windows

How do I fix it?

UPDATE: No more error appears when installing more Bower command it does not work: inserir a descrição da imagem aqui

1 answer

1

Apparently, the error is that you are trying to install programs as a normal user.

In the case of Windows, you have to run the command prompt as an administrator to carry out that operation.

EDIT

Apparently the bower is not in the PATH system. Do the following:

  1. Edit the bash startup file (/.bashrc);
  2. In the edited file, write PATH="$PATH":path/pasta/bin/do/bower;
  3. Export the PATH, still in the same file (EXPORT $PATH;);
  4. Save and close the file;
  5. Open a new terminal window;
  6. Check the command bower -v.

Source of instructions

  • I opened windows cmd as administrator and I ran the same code gave no error, but now I try to see if Bower was installed bower -v and says that the command was not found

  • You tried to restart the computer after?

  • Yes, and keep giving Command not found

  • Update the question with the new bug.

  • Ready put up a print of what is happening

  • I updated the answer.

  • Can’t do it the way you said. I downloaded the control panel and put it in the path this: C:\Program Files (x86)\Git\local;C:\Users\Casa\AppData\Roaming\npm;C:\Users\Casa\AppData\Roaming\npm\node_modules\bower\bin\bower

  • Just haven’t erased the whole PATH by typing it. But it must have worked, I think.

Show 4 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.