-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Replace bower-asset with npm-asset #20067
Comments
Just replacing bower with npm might lead to problems, since both services work very differently. I'd strongly recommend to wait for a fix in asset-packagist. @bizley @terabytesoftw A change from bower to npm might be an option for 2.2, but please not for 2.0. |
Is there any workaround? |
A the moment bower-asset/jquery is not installable anymore for us. @karelvasicek do you have any workaround? |
No, we unfortunately don't have any. We updated our main project some time ago and it hadn't worked either initially (packages had been downgraded), but started to work some time later (packages were updated again). It seems to work from time to time. |
In composer.json: "replace": {
"bower-asset/jquery": "*",
"bower-asset/jquery-ui": "*"
} Next install the depencies with npm, "jquery-ui": "npm:components-jqueryui@^1.12.1",
"jquery": "^3.0.0" Above dependency for jquery-ui, makes it being installed into jquery-ui instead of components-jqueryui, long ago - I think that fixes some issues with Yii and maybe older JS. Lastly see here how to tell yii Asset Manager to load your npm files.. Rinse and repeat for whatever library u need to replace. |
@karelvasicek @ailmanki Thanks. |
Here i think it is worth considering two solutions for the future.
|
It seems to me no issue; the framework allows perfectly to replace it with NPM or any other mechanism. |
I don't know what's been going on with Bower's jQuery but I clicked Fetch Updates just now on https://asset-packagist.org/package/bower-asset/jquery and it is now showing the newer releases of jQuery beyond 3.6.1. My composer project is no longer downgrading my bower jquery package. |
Sadly that works only sometimes for some hours. It is already gone again. |
@SilverFire, @hiqsol would you please take a look at this one? |
we already use yarn in our projects and removed bower completely |
Related f.ex. to hiqdev/asset-packagist#163 and especially to hiqdev/asset-packagist#163 (comment) .
composer update
results to some packages downgrade.Question is if/how it's related to https://bower.io/, it (as stated there) is maintained, but f.ex.
All packages required by Yii2 are available as
npm-asset/package
and versions seem to be correct in that case.The text was updated successfully, but these errors were encountered: