-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Many peerDependencies are not installed #4606
Comments
Hi, Why is this a Quasar bug? Unfortunately, it's an npm architectural decision that is currently outdated. Many other CLIs are in the same bucket as we are. Instead of raising an issue on Quasar, the best approach would be to do it on npm and yarn. They should look at the real dependency tree and not only in package.json. Quasar is supplying vue and webpack and other packages that are pinned to a specific version. And so they should be. We test them before doing a CLI release so you, the developers won't have to. Everything just works out of the box for you. Not sure if you saw the Vue 2.3 or Vue 2.6 that initially have introduced some problems, or one of the previous Webpack versions (can't remember which, but it broke HMR). Part of our job is to supply you with the latest and greatest AND safe packages that you can use. We could make the CLI install these dependencies BUT we would also need to check them each time a command is run. And it would mean that the CLI perf would go down due to the additional complexity that we would add (not to mention the billion cases that we would need to handle -- for all OSes, for npm, for yarn, only after you have run an yarn/npm install, etc etc, you get the picture). We don't want perf to go down. Instead, why not handle this the proper way, which is to push on npm and yarn maintainers to actually check the installed packages rather than blindly relying on reading package.json. I hope you can agree. |
Well, I was discussing this two days ago with @nothingismagick on Discord (that's why I referenced him) and he asked me to open the issue here, I didn't know it was a deliberate decision. Futhermore, "hiding" all stuff behind Quasar seems like fencing off developers from all the other parts of the ecosystem. Checking if quasar works in real-world projects, with newer versions of a particular dependency, becomes more difficult from possible contributors. Another point is that, Angular for example, which pretty much abuse Also Vue CLI adds some dependencies directly on the project (core.js, typescript, babel-core, etc). Not saying using No problem if you don't have time to deal with this kind of discussions right now ☮️ EDIT: I saw that Vue too is moving torwards a |
Describe the bug
Most peerDependencies are not explicitly added to the
package.json
, generating warnings at every yarnadd
,install
,remove
, etc.Quasar works anyway thanks to dependencies de-duplication, but the moment another dependency require a different version of a peerDependency (or one of them is dropped, while the user was relying on its implicit presence), something will fail without a meaningful error message.
@nothingismagick
https://nodejs.org/es/blog/npm/peer-dependencies/
Expected behavior
Quasar and it's extensions should explicitly state their peerDependencies and quasar-cli should automatically add them to
package.json
(and consequentially install them) upon project creation and extension adding.Additional context
I made up this partial list based on my memory of last days of trial and error and common sense, but only maintainers really know which should be a peerDependency and which doesn't, so only take it as an hint.
Quasar
Every Quasar extension
Typescript extension
Jest testing
The text was updated successfully, but these errors were encountered: