Skip to content
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

Not able to install some packages #15

Closed
napsio opened this issue Jul 22, 2014 · 11 comments
Closed

Not able to install some packages #15

napsio opened this issue Jul 22, 2014 · 11 comments
Assignees
Labels
Milestone

Comments

@napsio
Copy link

napsio commented Jul 22, 2014

There is a problem, when the bower name does not match the package name.

For example the package jQuery UI in the bower repository has the name jquery.ui (https://bower.herokuapp.com/packages/jquery.ui), but in the bower.json and package.json the name is jquery-ui. There is a huge number of packages with the same problem, for example chartjs (https://bower.herokuapp.com/packages/chartjs).

Other packages like highlightJS (https://bower.herokuapp.com/packages/highlight) coudn't be found at all, because the package.json is not in the root folder but in the src folder of the GitHub project (https://github.com/isagalaev/highlight.js).

@francoispluchino
Copy link
Member

What is error that have you?

@francoispluchino
Copy link
Member

Ok, I just reproduce the behavior, I corrects the bug.

@napsio
Copy link
Author

napsio commented Jul 22, 2014

The error is:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package bower-asset/jquery.ui could not be found in any vers
ion, there may be a typo in the package name.

@francoispluchino
Copy link
Member

You will not find either the package with the commands show and search:

composer show bower-asset/jquery.ui
composer search bower-asset/jquery.ui

@napsio
Copy link
Author

napsio commented Jul 22, 2014

On the show command the result is:

[InvalidArgumentException]
Package bower-asset/jquery.ui not found

But if I try:

composer search jquery.ui

there is bower-asset/jquery.ui in the results.

I dumped the $composer variable in the GitHubDriver::getComposerInformation method. The result was:

Array
(
    [name] => jquery-ui
    [ignore] => Array
        (
            [0] => **/.*
            [1] => build
            [2] => demos
            [3] => external
            [4] => tests
        )

    [dependencies] => Array
        (
            [jquery] => >=1.6
        )

    [devDependencies] => Array
        (
            [jquery-mousewheel] => 3.1.11
            [jshint] => 2.4.4
            [qunit] => 1.14.0
            [jquery-1.6.0] => jquery#1.6.0
            [jquery-1.6.1] => jquery#1.6.1
            [jquery-1.6.2] => jquery#1.6.2
            [jquery-1.6.3] => jquery#1.6.3
            [jquery-1.6.4] => jquery#1.6.4
            [jquery-1.7.0] => jquery#1.7.0
            [jquery-1.7.1] => jquery#1.7.1
            [jquery-1.7.2] => jquery#1.7.2
            [jquery-1.8.0] => jquery#1.8.0
            [jquery-1.8.1] => jquery#1.8.1
            [jquery-1.8.2] => jquery#1.8.2
            [jquery-1.8.3] => jquery#1.8.3
            [jquery-1.9.0] => jquery#1.9.0
            [jquery-1.9.1] => jquery#1.9.1
            [jquery-1.10.0] => jquery#1.10.0
            [jquery-1.10.1] => jquery#1.10.1
            [jquery-1.10.2] => jquery#1.10.2
            [jquery-1.x] => jquery#1.10.2
            [jquery-2.0.0] => jquery#2.0.0
            [jquery-2.0.1] => jquery#2.0.1
            [jquery-2.0.2] => jquery#2.0.2
            [jquery-2.0.3] => jquery#2.0.3
        )

    [time] => 2014-07-17T15:30:31Z
    [support] => Array
        (
            [source] => https://github.com/jquery/jquery-ui/tree/master
        )

)

So the right repository can be found, but it would be stored as jquery-ui in the packages collection insead of jquery.ui

@francoispluchino
Copy link
Member

Problem found: in the file bower.json, the name of package is "jquery-ui" and not "jquery.ui" (https://github.com/jquery/jquery-ui/blob/master/bower.json)

@francoispluchino
Copy link
Member

I will avoid replacing the package name found in the file.

@napsio
Copy link
Author

napsio commented Jul 22, 2014

Yes, that's the problem, like I wrote in the first post.

@francoispluchino
Copy link
Member

Sorry, I had mistranslated...

@napsio
Copy link
Author

napsio commented Jul 22, 2014

No problem :)

@francoispluchino francoispluchino added this to the 1.0 milestone Jul 22, 2014
@francoispluchino francoispluchino self-assigned this Jul 22, 2014
@francoispluchino
Copy link
Member

Fixed (see d6aa913).

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

No branches or pull requests

2 participants