Bower install requirejs resulting in only a .bower.json file

2.4k views Asked by At

I am fetching requirejs with the command bower install requirejs ---save and this is resulting in a requirejs folder being added to my components folder, but within it the require.js file (and all other files) is not there. The only file added is a .bower.json file. I assume that I must be misunderstanding something. When I grab other packages through bower (like angular and angularAMD) I get the javascript content, but not for require. What gives?

bower.json file below

{
  "dependencies": {
    "angular": "latest",
    "requirejs": "latest",
    "angularAMD": "latest"
  },
  "resolutions": {
    "angular": "1.5.8"
  }
}

and .bowerrc

{
    "directory": "bower_components/lib"
}

Also of note is that I installed bower through nuget, which added a .bin folder to the project with the following files in it bower.cmd, git.cmd, and node.cmd. I believe these are mini instanced of git and node to use for fetching, I assume the problem lies somewhere with these as they are the only real difference between intellij and visual studio.

1

There are 1 answers

0
Saurabh Pati On

Try running the command 'bower -v' in your terminal and see the version of your bower. I have 1.8.0 installed in my system and requirejs does get installed correctly for me with the require.js file inside the requirejs folder installed by bower. Although, I do remember facing such issues at some other point in time for another package which I solved it by cleaning my bower cache, you can do that by running the command 'bower cache clean' and while you are at it you may also try to clear your temp folder by which is by pressing 'windows key + R' typing %temp% in the search and then press enter, delete whatever can be deleted and, restart your terminal and go over the installation again.

The process for clearing the temp folder is for windows, you may want to look for another way to clear it if you are not on a windows machine.

Thanks.