Bower Issue: bower_components not created

I created the bower.json file in the root of my project, but when I ran:

$ bower install 

I get the following output:

 bower not-cached https://github.com/mirceasinteanu/nanoScrollerJS.git#master bower resolve https://github.com/mirceasinteanu/nanoScrollerJS.git#master bower not-cached http://jamesallardice.imtqy.com/Placeholders.js#* bower resolve http://jamesallardice.imtqy.com/Placeholders.js#* bower download http://jamesallardice.imtqy.com/Placeholders.js bower cached http://github.com/davatron5000/FitVids.js.git#1.1.0 bower validate 1.1.0 against http://github.com/davatron5000/FitVids.js.git#* bower cached git://github.com/jquery/jquery.git#1.10.2 bower validate 1.10.2 against git://github.com/jquery/jquery.git#~1.10.0 bower cached git://github.com/gfranko/jquery.selectBoxIt.js.git#3.8.1 bower validate 3.8.1 against git://github.com/gfranko/jquery.selectBoxIt.js.git#* bower cached git://github.com/chrisabrams/commonjs.git#0.2.0 bower validate 0.2.0 against git://github.com/chrisabrams/commonjs.git#0.2.0 bower cached git://github.com/components/jqueryui.git#1.11.2 bower validate 1.11.2 against git://github.com/components/jqueryui.git#* bower cached git://github.com/jonom/jquery-focuspoint.git#1.1.1 bower validate 1.1.1 against git://github.com/jonom/jquery-focuspoint.git#* bower checkout nanoscroller#master bower invalid-meta nanoscroller is missing "ignore" entry in bower.json bower resolved https://github.com/mirceasinteanu/nanoScrollerJS.git#5e348f0bb9 bower EHTTP Status code of 404 

The bower_components folder is not created and therefore I get errors when referring to bower packages.

I use:

 OSX 10.9.5 node v0.12.0 npm v2.5.1 bower v1.3.12 git v1.9.2 

I tried to work:

 $ npm cache clean 

Any help would be greatly appreciated.

+9
source share
6 answers

Do you have a .bowerrc file in the project root directory?

if you should not create it and you can follow the guide:

bower.io

if you have this configuration file, you can send it to your question :)

+7
source

I am not sure about the other answer here (including .bowerrc ) ...

This problem also occurs when the resource is unavailable, or the link / mirror does not work on it.

For example, today I received the following error:

 bower closure-compiler#* progress Receiving objects: 17% (202/1158), 3.82 MiB | 281.00 KiB/s bower closure-compiler#* progress Receiving objects: 17% (202/1158), 4.03 MiB | 264.00 KiB/s bower closure-compiler#* progress Receiving objects: 17% (203/1158), 4.14 MiB | 266.00 KiB/s bower closure-compiler#* progress Receiving objects: 17% (205/1158), 4.36 MiB | 258.00 KiB/s bower closure-compiler#* progress Receiving objects: 17% (205/1158), 4.81 MiB | 260.00 KiB/s bower leaflet#* EHTTP Status code of 404 

Which tells me that the leaflet (the third-party map library that I use) is not available. And of course, the flyer resource I pointed to was not available at that time. In this case, I should go to my bower.json file, not the .bowerrc file, and check that the record / configuration I use for any resource gave me 404 (in this case, a leaflet).

Regarding the OP comment:

No bower_components folder has been created, so I get errors when referring to beam packages.

This is because the bower install command works (or seems to work) as a transaction, in case one part does not work, the whole installation fails ... therefore, if you did not have the bower_components directory bower_components , this will not create it for you if the installation fails.

+7
source

simple steps to get the bower_component folder in your application:

1) first create a .bowerrc file in the root of your application. (just like another file has =, .gitignor or .sailsrc , etc.).

2) In the .bowerrc file .bowerrc specify the directory in which you want to install the bower_component.see folder below

 { "directory" : "assets/bower_components" } 

3), then run bower install .

it checks the .bowerrc file to get the directory and create the bower_component folder.

Hope this helps :)

+2
source

I know this is an old post, but I had a similar problem, and I realized that this has nothing to do with .bowerrc . In fact, the problem was caused by the wrong version of the dependency. In my case, I manually edited the dependency version number, which I thought was correct. However, when I returned this version back to the fact that it worked. It seems that if you change the version number of the dependencies to the wrong version number, installing bower will silently fail without any errors. So go ahead and make sure that the versions of the listed dependencies in your bower.json are correct. or if you don’t know which one is causing the problem, back up the bower.json file and then remove all the dependencies from the bower.json file and run bower install <yourpackage>#<version> --save for each from dependencies.

Note: watch the "~" sign next to each version;)

+1
source

Make sure your .bowerrc file is not configured to store libraries in a directory other than "bower_components", such as a library. In fact, Bauer can copy files, not where you expect it to be.

0
source

bower install --force-lastest works for me

0
source

Source: https://habr.com/ru/post/982179/


All Articles