-
Notifications
You must be signed in to change notification settings - Fork 113
Upgrade Yarn to 4.5.1 and Nx to 20 for fixing alias packaging resolution #2954
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aglinxinyuan
approved these changes
Oct 21, 2024
Contributor
aglinxinyuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
shengquan-ni
added a commit
that referenced
this pull request
Nov 1, 2024
The old docker file does not sync with the latest yarn change(#2954) and fails to compile. This PR updates the Dockerfile to use yarn 4.5.1.
PurelyBlank
pushed a commit
that referenced
this pull request
Dec 4, 2024
…ion (#2954) This PR fixes CI issues introduced in #2912. The symptom is frontend test ci failed without failing the entire CI. There are a few reasons underneath: - **Alias dependency resolution issue.** The newly introduced `Monaco-editor-wrapper` has peer dependency with alias `@codingame/monaco-vscode-api@8.0.4`. Yarn@1 will install it as `vscode@npm:@codingame/monaco-vscode-api@8.0.4` in the lock file. However, during parsing the lock file, Nx reports cannot find the package with name `npm:vscode@npm:@codingame/monaco-vscode-api` (note for the `npm:` in the beginning). > Solution (2 steps): > 1. Added resolution in package.json `monaco-editor: npm:vscode@npm:@codingame/monaco-vscode-api` so that the generated lock file has correct handle. > 2. To be able to parse this added resolution field, Yarn@1 has to be upgraded to Yarn@4.5.1. - **multiple webpack resolution issue.** Our project uses a custom webpack. Monaco also introduces their webpack dependency. There are multiple webpacks, and the used version got resolved to be `@5.92.3` which caused error when bundling frontend compile files. > Solution: pin webpack version to use `@5.89.0` in resolution. - **Nx not failing upon a failed execution.** In #2912, we also updated the Nx from @18.1.3 to @18.2.0. The frontend test is failed to be executed, but Nx reports success (did not return error). > Solution: this seems to be a bug on Nx side. in release @18.2.0, a bug was introduced so that errors reported from the project graph build during the daemon process would not be rethrown, causing the main thread to not fail properly. We updated it to version @20.0.3 and it is confirmed to be solved. See https://github.com/Texera/texera/actions/runs/11429004023 (it properly failed the CI). ### Steps to migrate this PR: Under `core` directory: - You need to switch from Yarn@1 to Yarn@4.5.1: run `corepack enable && corepack prepare yarn@4.5.1 --activate && yarn --cwd gui set version 4.5.1` Under `core/gui` directory: - You can verify the Yarn version with `yarn --version`. It should show 4.5.1 - Remove all cached/dependency files: `rm -rf node_modules .angular` - Reinstall with the upgraded Yarn: `yarn install`
PurelyBlank
pushed a commit
that referenced
this pull request
Dec 4, 2024
The old docker file does not sync with the latest yarn change(#2954) and fails to compile. This PR updates the Dockerfile to use yarn 4.5.1.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes CI issues introduced in #2912. The symptom is frontend test ci failed without failing the entire CI. There are a few reasons underneath:
Monaco-editor-wrapperhas peer dependency with alias@codingame/monaco-vscode-api@8.0.4. Yarn@1 will install it asvscode@npm:@codingame/monaco-vscode-api@8.0.4in the lock file.However, during parsing the lock file, Nx reports cannot find the package with name
npm:vscode@npm:@codingame/monaco-vscode-api(note for thenpm:in the beginning).@5.92.3which caused error when bundling frontend compile files.Steps to migrate this PR:
Under
coredirectory:corepack enable && corepack prepare yarn@4.5.1 --activate && yarn --cwd gui set version 4.5.1Under
core/guidirectory:yarn --version. It should show 4.5.1rm -rf node_modules .angularyarn install