Support Yarn 2, especially regarding stricter peerDependencies constraints
See original GitHub issueDescribe the bug Quasar does not specify Vue as peer dependency but imports from it. I’m using yarn@2 and it much stricter and is not allowing package to use other packages without specifying them as dependencies.
Codepen/jsFiddle/Codesandbox (required) https://github.com/Demivan/quasar-yarn-2-issue
To Reproduce Steps to reproduce the behavior:
- Checkout repository
- run
yarn build
- See build error.
Expected behavior No build error should be produced.
Screenshots With webpack
ERROR in ./.yarn/cache/quasar-npm-1.12.13-43fa104864-2.zip/node_modules/quasar/src/utils/open-url.js 1:0-21
Module not found: Error: A package is trying to access another package without the second one being listed as a dependency of the first one
Required package: vue (via "vue/dist/vue.runtime.esm.js")
Required by: quasar@npm:1.12.13 (via ./.yarn/cache/quasar-npm-1.12.13-43fa104864-2.zip/node_modules/quasar/src/utils/)
With rollup:
(node:139528) [MODULE_NOT_FOUND] Error: quasar tried to access vue, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound.
(Use `node --trace-warnings ...` to show where the warning was created)
Platform (please complete the following information): Yarn: yarn@2 berry
Additional context Fix using .yarnrc.yml: https://github.com/Demivan/quasar-yarn-2-issue/blob/fix/.yarnrc.yml
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (13 by maintainers)
Top Results From Across the Web
Plug'n'Play | Yarn - Package Manager
An overview of Plug'n'Play, a powerful and innovative installation strategy for Node.
Read more >Introducing Yarn 2 ! - DEV Community
Even better, portals properly follow peer dependencies, regardless of the location of the symlinked package. Workspace Releases. Working with ...
Read more >Should You Use Upper Bound Version Constraints?
To be clear, Poetry doesn't force version pinning on you, ... Really large libraries hate making major releases - Python 2->3 was a...
Read more >[AskJS] Is someone using Yarn v2 in business? - Reddit
For help, questions, and anything Yarn related, there is an official ... of Yarn 2 (new commands, new protocols, plugins, constraints, etc.) ...
Read more >Why use peer dependencies?
Why use a peer dependency? ... I've been an advocate for using peer dependencies in consuming libraries because it provides a few key...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maggie0002 @taai the error regarding resolving Vite’s version (
TypeError: Cannot read property 'version' of undefined
) will be addressed in #13609.Please use Yarn v1 for the moment. The v2 of Yarn has some hard requirements that forces us to not be able to provide a good developer experience.
We have plans to create a CLI based on Vite instead of Webpack and that will allow us to officially support Yarn 2.