Skip to content
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

Yarn Berry (v2 & v3) is not supported: Unsupported option name ("--no-lockfile") #741

Open
lolmaus opened this issue Jul 23, 2021 · 5 comments

Comments

@lolmaus
Copy link
Contributor

lolmaus commented Jul 23, 2021

Hi!

When trying to run yarn test:ember-compatibility in my addon, I receive:

❯ yarn test:ember-compatibility
Unknown Syntax Error: Unsupported option name ("--no-lockfile").

$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
Error!
1
undefined

This is because Yarn Berry does not have the --no-lockfile option.

I cannot use Yarn 1 because it crashes on nohoist: *, and package hoisting in my monorepo breaks many things.

@kategengler
Copy link
Member

You can customize the options passed to yarn with the buildManagerOptions() function in the config https://github.com/ember-cli/ember-try/blob/master/README.md#config

However, I think it is worth noting that ember-cli also does not support yarn > 1 ember-cli/ember-cli#8164

@elwayman02
Copy link

@kategengler can we revisit this now that ember-cli does in fact support yarn berry? The issue you linked has been closed as the blocking problems were resolved in the last few years.

@kategengler
Copy link
Member

I'd be happy to look at a PR, but, in general, yarn support in ember-cli and associated addons is somewhat stale. I opened this issue myself ember-cli/ember-cli#10339 but have since moved to pnpm.

@elwayman02
Copy link

elwayman02 commented Jul 17, 2024

I can confirm that yarn berry works generally for ember apps - we've been using it in production for several years now. The main gap is that ember-try forces the non-existent --no-lockfile flag when useYarn is true, and as of Yarn 4+, that actually throws an error which crashes the tests. In Yarn 3, it fails silently instead (but likely still isn't doing the behavior ember-try wants).

As such, I'm less worried about overall yarn support in ember-cli and more about making sure that ember-try isn't actively causing failures while the rest of the ecosystem seems to be working fine.

@kategengler
Copy link
Member

I'm happy to look at a PR to support, but until then, the buildManagerOptions above is a decent workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants