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 package install failed #268
Comments
Same here.... When I do a composer install, composer fails because a "bower-asset/XXX" dependency. It fails with a message like this: I checked out the repos in https://github.com/bower-asset and all of them are private or they have been removed.... Is there anything I'm missing?. Yii2: v2.0.10
|
Same problem 😢 |
It sounds like a problem with Packagist ! see https://packagist.org/search/?q=bower-asset, Now, Packagist references the virtual packages. |
I think I have found the problem. Since the v2.0 of Punycode.js, the bower.json file no longer exists. So the plugin does not replace the name in the download links. I am working on a fix of the problem. |
Only the For the moment, add this constraint in your composer project file: {
"require": {
"bower-asset/punycode": "^1.3.0 !=1.3.2",
"bower-asset/jquery": "^1.12 !=1.12.4"
}
} |
I've had the same problem with jquery.inputmask |
My project requires Yii2. For its part, Yii2 requires this bad dependencies. We are waiting for fix composer asset plugin. |
@rezident Maybe creating an issue on https://github.com/yiisoft/yii2 as there will be a lot of other users affected by this problem. Me as well. This is absolutely the downside of such frameworks relating to other library's and plugins. |
After removing my Composer caches, I confirm that the problem comes from Packagist. Composer downloads a list of repository providers in The problem comes with the virtual packages referenced by many packages with |
The problem is with the packages: |
For those who faced this problem - try https://asset-packagist.org as an alternative. |
@francoispluchino I see the problem but why does it only appear today? The package |
@SilverFire You're going to have the same problem, Because the packages referenced in Packagist are retrieved before the others. |
@cebe because I think that the fallback repo was github repo, and it disappeared today. |
@diegoparkingdoor what is "fallback repo"? can you give more info or a link? |
I confirm all works after switching to https://asset-packagist.org (bower-asset/jquery was the problem before). |
In the file {
"packages": {
"bower-asset\/jquery": {
"1.12.4": {
"name": "bower-asset\/jquery",
"description": "Distribution repo for jQuery Core releases.",
"keywords": [],
"homepage": "",
"version": "1.12.4",
"version_normalized": "1.12.4.0",
"license": [],
"authors": [],
"source": {
"type": "git",
"url": "https:\/\/github.com\/bower-asset\/jquery.git",
"reference": "a76fe112f860279382d9f6336fe040fd8f8aa13d"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/bower-asset\/jquery\/zipball\/a76fe112f860279382d9f6336fe040fd8f8aa13d",
"reference": "a76fe112f860279382d9f6336fe040fd8f8aa13d",
"shasum": ""
},
"type": "library",
"time": "2016-12-19T07:13:46+00:00",
"uid": 1133121
},
//....
}
}
} It's the source url and the dist url that are used. |
why are these added there, the package is virtual on packagist, it should not have any source or dist urls. |
is that something created by packagist.org? |
might be. I did not find it on packagist however. https://packagist.org/providers/bower-asset/jquery |
yes, it is on packagist as a virtual package because of my yii2-asset-free package. but that has been there since I created it. |
So again:
|
Problem analysis, thanks to @alcohol from
"bower-asset/jquery": {
"1.12.4": {
"name": "bower-asset/jquery",
"description": "Distribution repo for jQuery Core releases.",
"keywords": [ ],
"homepage": "",
"version": "1.12.4",
"version_normalized": "1.12.4.0",
"license": [ ],
"authors": [ ],
"source": {
"type": "git",
"url": "https://github.com/bower-asset/jquery.git",
"reference": "a76fe112f860279382d9f6336fe040fd8f8aa13d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bower-asset/jquery/zipball/a76fe112f860279382d9f6336fe040fd8f8aa13d",
"reference": "a76fe112f860279382d9f6336fe040fd8f8aa13d",
"shasum": ""
},
"type": "library",
"time": "2016-12-19T07:13:46+00:00",
"uid": 1133121
},
"dev-master": {
"name": "bower-asset/jquery",
"description": "Distribution repo for jQuery Core releases.",
"keywords": [ ],
"homepage": "",
"version": "dev-master",
"version_normalized": "9999999-dev",
"license": [
"Jquery"
],
"authors": [ ],
"source": {
"type": "git",
"url": "https://github.com/bower-asset/jquery.git",
"reference": "7f3fb476862a87eff31d55d29fcbf1d7f28a576f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bower-asset/jquery/zipball/7f3fb476862a87eff31d55d29fcbf1d7f28a576f",
"reference": "7f3fb476862a87eff31d55d29fcbf1d7f28a576f",
"shasum": ""
},
"type": "library",
"time": "2016-12-19T07:15:56+00:00",
"uid": 1133122
}
},
|
@Seldaek is is possible to drop those packages from Packagist.org? |
I just reported it to packagist here: composer/packagist#756 |
As a workaround I added the package to the replace section in my composer file.
Note that you'll have to make sure to include jquery manually if you need it. This is just a quick fix that may help you until the issue has been resolved. |
@erikverheij Maybe include a replacement of all asset packages from the plugin? |
@francoispluchino as far as I see only the package that is advertised by packagist are affected, which are jquery and punycode so far. |
@erikverheij There is a problem with your solution: {
"require": {
"bower-asset/jquery": "1.12.4"
},
"replace": {
"bower-asset/jquery": "*"
}
}
The package is not installed. |
The problem can be worked around by adding the following to your composer.json: "require": {
...
"bower-asset/jquery": "<1.12.4",
"bower-asset/punycode": "<1.3.2"
}, This will exclude the versions that have been added wrongly to packagist and will allow the asset plugin to install the correct packages. |
it did work for me with clean cache here... |
@cebe It did not work for me with the full example of @jmmerino and my patch, because I forgot to add that of jquery. No comment... Add that, solves the problem of my previous comment: {
"require": {
"bower-asset/punycode": "^1.3.0 !=1.3.2",
"bower-asset/jquery": "^1.12 !=1.12.4"
}
} But it will not fix the problem definitely. It is enough that the guy updates his package, or adds others, and the problem will continue. |
Sure, this is just a workaround for now. Btw, I have registered:
to reserve the vendor namespaces on packagist, when composer/packagist#756 gets fixed, this should prevent such issues form happening in the future. |
@cebe With your proposal, reserved only one package name with vendor name, is enough to reserve the vendor name? |
@francoispluchino I confirm it! Thank you very much! |
|
@francoispluchino I am trying to register the names on github as well. Contacted github about https://github.com/bower-asset and @SilverFire has registered https://github.com/npm-asset will add you as owner too when it is done. |
For the case I've registered bower-asset and npm-asset users on Packagist.org as well |
afaik, that does not help anything as user names on packagist have no special purpose. |
Yes, I know that. That's why I've said "just for case" |
Today, I ran into a problem when trying to update the packages through composer update. None of the packages Bower-Assets has not been found and update fails. But Bower the work. Log:
Composer and assets plugin is latest version.
The text was updated successfully, but these errors were encountered: