-
-
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
Support Yarn 2, especially regarding stricter peerDependencies constraints #7581
Comments
We haven't tested Quasar on Yarn 2 yet, so we cannot assure compatibility. Thanks for reporting and suggesting a fix, this could help the community while we still doesn't officially support it. About |
Quasar cli |
|
Please use Yarn v1 for the moment. We have plans to create a CLI based on Vite instead of Webpack and that will allow us to officially support Yarn 2. |
@rstoenescu Could Quasar at least support Yarn 2 with Thanks |
@rstoenescu Will Quasar support yarn 2 with webpack in the future? We rely on webpack and cannot switch to vite for various reasons. |
To share some experiences from the last few days, yarn 2 (now yarn 3) is a very different kettle of fish. Has been very difficult to integrate in to a project (not a Quasar project, something even simpler), it seems to have largely abandoned the idea of production vs development builds, does not adhere to the NODE_ENV variable, makes Docker files significantly longer and more complicated, and without production flags hasn't reduced the size of the package (there are some ways to get production builds, but it requires additional plugins to be installed, it seems the general direction they are heading is to keep one flat package.json file for everything). Inevitably I am sure there will be a Quasar transition to the latest yarn, but wanted to flag that it may not be all roses and rainbows, be careful what we wish for. |
Note that since we externalized many of the dependencies for which we controlled and pinned versions (vue, vuex, vue-router) in order to support Vite with the new CLI, it should now be possible to use Yarn2 with latest Quasar app-webpack and app-vite packages, as well as latest NPM and PNPM package managers |
I did have some success with that:
Update the .gitignore files: https://yarnpkg.com/getting-started/qa/#which-files-should-be-gitignored At this stage though it is in the compatibility mode, using the legacy Removing
|
Thanks for reporting, have you tried with Yarn 3 too? |
This is Yarn 3, I haven't tried with Yarn 2. 3.2.0 I have decided to abandon it and stick with Yarn 1. Nothing to do with Quasar, it's all on the Yarn end. I got about as far as trying to get Visual Studio Code to read from zip files instead of node_modules, which involved extensions for reading from Zip files, and the usual VSC dramas. Maybe in a few versions time the docs will be better and the integration smoother for the newer yarn. |
Do we still have to use yarn v1 or can we use v2 or higher after quasar cli 1.3? |
Yarn 1 is still the only one fully supported. |
Yarn 3 works perfectly fine as long as you set Proper pnp mode support would be great in the future though... |
I tried installing dependencies with The problem appears to be with resolving dependencies only relative to That line should be replaced with this:
It would make the resolver first to look in the specified directory and then in default paths. Then it works also with So, the file const appPaths = require('../app-paths')
module.exports = function (pkgName, folder = appPaths.appDir) {
if (pkgName === '@quasar/app-vite') {
return require('../../package.json')
}
try {
return require(
require.resolve(`${pkgName}/package.json`, {
paths: [ folder ].concat(module.paths)
})
)
}
catch (e) {}
} |
@Maggie0002 @taai the error regarding resolving Vite's version ( |
Another related yarn support issue, when running a build for electron it passes the
Rather than open a new issue, knowing that yarn > 1 isn't yet officially supported, adding here. Any thoughts on workaround appreciated |
Dear @rstoenescu, I am facing the exact same issue. |
Perhaps I should have created this as a separate issue for tracking? |
@Maggie0002 yes, please do |
Logged here: #14618 |
Yarn2 is not recommended with quasar (see above) yet yarn 1 does not support private repos in addition to public repos. So I try to migrate to npm . Where is it configured which package - manager is to be used with the latest quasar version. The problem is yarn is called from quasar ext add @bla/package-Id. But it should call npm |
Found the solution myself.....removed yarn from engine in package.json |
@NGPixel Is this still working? For Quasar CLI with Vite? Anything else to put into |
@Dirk- I would kindly say the best way is trying it out rather than asking a question in an issue that was closed 8 months ago. nodeLinker values |
Sure. I forgot to mention @NGPixel in my reply, I was just asking for his experience. "Trying it out" usually means going down the rabbit hole for hours or days in JavaScript-based projects... This is why I like Quasar so much, it frees me from these hassle.
OK, thanks. I probably need yarn v3 or v4 to get an Electron app with a native module packaged. |
Hi Dirk, fix had been committed already: #15747 (comment) |
Describe 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:
yarn build
Expected behavior
No build error should be produced.
Screenshots
With webpack
With rollup:
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
The text was updated successfully, but these errors were encountered: