-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
asset-plugin can not satisfy constraint, while npm/yarn silently upgrade #307
Comments
Because NPM/Yarn can install multiple version of the same library, but that Composer can only have a single version for the same library (flat dependency):
The plugin is capable of obtaining several versions of the same library, but not for the resolution of conflicts. Currently the plugin can resolve conflicts like Bower (in config and with only single version of dependency). |
You can see the doc Solve the conflicts of asset dependencies. |
Interesting point for Yarn, it is able to create a flat dependencies with the option Try:
And you obtains a wizard to solve the conflicts for: |
I am just playing around with those and it looks to me like it is virtually impossible to do flat installations even on a single package ( I just learned today about But aren't those For sure, when bundling js/css you'd need another tool then... |
peerDependencies is very little used. And for this plugin, it's not necessary because Composer already requires the same compatible version of a dependency. To solve the resolution of dependencies, you must use the |
My problem is that there are so many projects, which simply do not resolve to a single version for a certain package. Since bower is deprecated and we will have to move to npm sooner or later, this will get worse. I don't think a manual resolution is feasible in the long term. I'll close this issue since, it's not really fixable. But we should re-think assets for Yii 2.1 |
Due to issues with an npm-asset I tried to debug it with
yarn install mermaid
Giving me those packages:
But mkdirp 0.5.1 says mininist 0.0.8 https://github.com/substack/node-mkdirp/blob/0.5.1/package.json But I get 1.2.0 above.
With fxp I get:
Seems like this is "normal" in the npm/yarn ecosystem :( Since many projects are dropping bower support, it might be necessary to switch to npm, but how to tackle this issue? Could fxp "fix" that also?
CC: @cebe @samdark This influences Yii 2 extensions to a great extend.
The text was updated successfully, but these errors were encountered: