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

build: Yarn Berry Playground #3447

Closed
wants to merge 13 commits into from
Closed

build: Yarn Berry Playground #3447

wants to merge 13 commits into from

Conversation

MaikoTan
Copy link
Contributor

@MaikoTan MaikoTan commented Sep 16, 2021

Per #3292

Plug'n'Play

PnP feature is enabled, but there are still errors with mocha and else.

Offline Cache

As yarn suggests, the cache (aka packages from npm) is bundled and uploaded to Git, although the size is much smaller than node_modules:

$ du -sh .yarn
190M    .yarn

$ du -sh .yarn/cache
61M     .yarn/cache

$ du -sh node_modules
507M    node_modules

How to try

Switch to this branch and then run yarn first, yarn would extract cache for you, and then replace all npm run blahblah as yarn run blahblah

@cactbotbot
Copy link
Collaborator

cactbotbot commented Sep 16, 2021

@MaikoTan Thanks for your contribution! 🌵🚀

@MaikoTan MaikoTan changed the title Build: Yarn Berry Playground build: Yarn Berry Playground Sep 16, 2021
@github-actions github-actions bot added the ci label Sep 16, 2021
@MaikoTan
Copy link
Contributor Author

MaikoTan commented Sep 16, 2021

The Github Actions CI failed because the --immutable flag for yarn install command was default to true in a CI environment

If the --immutable option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the immutablePatterns configuration setting). For backward compatibility we offer an alias under the name of --frozen-lockfile, but it will be removed in a later release.

And somewhat that the checksum of packages from registry on Github Actions CI are not equal to those in the local lockfile, so cause the fail.

But even I run the command yarn install --immutable on my computer, it works fine. I don't know what's wrong with Github Actions, maybe change the registry to npmjs would solve the problem?

@JLGarber Can you try this PR and give me some feedback? I believe it is runnable now.

@MaikoTan
Copy link
Contributor Author

MaikoTan commented Nov 7, 2022

As NPM now has part of Yarn Berry's features now, it would be better to just upgrade our npm version.

@MaikoTan MaikoTan closed this Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants