New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"bower install jquery" downloads the official jQuery project rather than the shim project #859

Closed
pkorzeniewski opened this Issue Sep 6, 2013 · 16 comments

Comments

Projects
None yet
@pkorzeniewski

pkorzeniewski commented Sep 6, 2013

The official jQuery project doesn't contain build files (jquery.js and jquery.min.js), so I believe "jquery" component should point to the shim project rather than the official jQuery project.

This is probably caused by the case-insensitivity, as "jquery" (shim project) and "jQuery" (official project) are both treated as the same project.

@satazor

This comment has been minimized.

Member

satazor commented Sep 6, 2013

$ bower lookup jQuery
jQuery git://github.com/jquery/jquery.git
$ bower lookup jquery
jquery git://github.com/components/jquery.git
$ bower install jQuery
bower jQuery#*                  cached git://github.com/jquery/jquery.git#2.0.3
bower jQuery#*                validate 2.0.3 against git://github.com/jquery/jquery.git#*
$ bower install jquery
bower jquery#*                  cached git://github.com/components/jquery.git#2.0.3
bower jquery#*                validate 2.0.3 against git://github.com/components/jquery.git#*

As you see, it is correctly installing the shim one when doing bower install jquery.

@pkorzeniewski

This comment has been minimized.

pkorzeniewski commented Sep 6, 2013

Interesting, on Windows 7 it returns the same project, which is jQuery, so I guess this is something OS-specific:

C:\>bower lookup jQuery
jQuery git://github.com/jquery/jquery.git

C:\>bower lookup jquery
jquery git://github.com/jquery/jquery.git
@vendethiel

This comment has been minimized.

vendethiel commented Sep 6, 2013

the fact that dirs are case-insensitive, prolly

@satazor

This comment has been minimized.

Member

satazor commented Sep 7, 2013

Yes, the bower-registry-client module stores lookup cache in files whose names are the package names . One solution would be to append a truncated md5 to the file name (e.g.: jQuery_dsa5431 and jquery_ji34543). This would resolve issues like this, since the hashes are different.

This would be an easy addition and should be done here: https://github.com/bower/registry-client/blob/master/lib/util/Cache.js#L182

@manovotny

This comment has been minimized.

manovotny commented Sep 27, 2013

I have been battling this all day and I am somewhat relieved that I found this ticket so I know I'm not crazy.

Would love to see this fixed!

@satazor

This comment has been minimized.

@satazor

This comment has been minimized.

Member

satazor commented Sep 28, 2013

Fixed

@stuaxo

This comment has been minimized.

stuaxo commented Mar 4, 2014

On ubuntu I just tried:

$ bower lookup jquery
jquery git://github.com/jquery/jquery.git

saxon@saxon-VirtualBox ~/projects/scratch/bower
$ bower lookup jQuery
jQuery git://github.com/jquery/jquery.git

This looks like the same problem ?

Certainly when I install jquery there is no jquery/jquery.js

@Uplink03

This comment has been minimized.

Uplink03 commented Mar 5, 2014

Ubuntu 12.04 here, npm@1.2.18, node v0.10.15:

$ bower lookup jquery
jquery git://github.com/jquery/jquery.git
$ bower lookup jQuery
jQuery git://github.com/jquery/jquery.git

bower 1.2.8 is a fresh install from five minutes ago with no previous installs on this system.

UPDATE: Bah! Must be the magic of the async Internet. jquery.min.js is found in dist/ after installation, but the project I cloned from github doesn't expect it there.

@trisys3

This comment has been minimized.

trisys3 commented Apr 10, 2014

Bootstrap's build package in Bower is "bootstrap", while its production package is "bootstrap-css". Maybe jQuery could do something like this?

@Q-ro

This comment has been minimized.

Q-ro commented Jul 8, 2014

On mac os this seems to still be a problem:

$ bower lookup jquery
jquery git://github.com/jquery/jquery.git

$ bower lookup jQuery
jQuery git://github.com/jquery/jquery.git

@danmur

This comment has been minimized.

danmur commented Jul 9, 2014

Still happening for me under OS X too, bower 1.3.7.

@sheerun

This comment has been minimized.

Contributor

sheerun commented Jul 9, 2014

That's because they are the same entry in the registry.

bower search jQuery | grep " jQuery "
    jQuery git://github.com/jquery/jquery.git

bower search jQuery | grep " jquery "
    jquery git://github.com/jquery/jquery.git
@eladzlot

This comment has been minimized.

eladzlot commented Jul 10, 2014

For now we can install components/jquery instead:

bower install components/jquery

Or in bower.json:

dependencies: {
    jquery: 'components/jquery#~2.1.1'
}
@artivilla

This comment has been minimized.

artivilla commented Sep 3, 2015

Is anyone else having this issue with outer.js and inner.js files not minifying?

@fjcero

This comment has been minimized.

fjcero commented Apr 5, 2016

There is a way to solve this on OSX?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment