fix: resolve yarn version synchronization causing SyntaxError on fresh clones#3099
Conversation
|
@praneeth622 Thanks for the fix! The version sync in package.json is the right solution. Could we trim this down to just that change? The validation tooling solves a problem we may not |
Synchronize volta.yarn version from 4.0.2 to 4.6.0 to match the packageManager field, resolving SyntaxError on fresh clone installations. Fixes RocketChat#2919
3910a86 to
a499a74
Compare
WalkthroughThe Volta/Yarn configuration in package.json was updated by incrementing the yarn version from 4.0.2 to 4.6.0 to address a syntax error occurring during fresh project clones. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Synchronizes the Yarn version configured for Volta with the repository’s packageManager Yarn version to prevent fresh-clone installation/runtime failures.
Changes:
- Updated
package.jsonvolta.yarnfrom4.0.2to4.6.0to matchpackageManager: yarn@4.6.0.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "volta": { | ||
| "node": "22.17.1", | ||
| "yarn": "4.0.2" | ||
| "yarn": "4.6.0" | ||
| }, | ||
| "packageManager": "yarn@4.6.0" |
There was a problem hiding this comment.
The PR description says all Yarn version references are synchronized and a validation script/docs/tests were added, but in the current repo state there are still Yarn 4.0.2 references (e.g. devEngines.yarn is >=4.0.2 in this file, and workspaces/desktop-release-action/package.json still pins volta.yarn to 4.0.2). This makes the fix incomplete and the description misleading—please either update those remaining references to 4.6.0 (or relax/remove them consistently) and include the promised validation, or adjust the PR description/scope accordingly.
Fix version synchronization issue where volta.yarn was set to 4.0.2 while packageManager was set to yarn@4.6.0, causing SyntaxError during fresh clone yarn installation.
Changes:
Problem
Users experienced
SyntaxError: missing ) after argument listwhen runningyarnon fresh clones. This occurred because:volta.yarnwas set to4.0.2packageManagerwas set toyarn@4.6.0.yarnrc.ymlpointed to.yarn/releases/yarn-4.6.0.cjsThis inconsistency caused tools like Volta to attempt using yarn 4.0.2 (which didn't exist) while the actual yarn binary was 4.6.0.
Solution
scripts/validate-yarn-config.js) to detect version mismatchesTesting
Files Changed
package.json- Fixed volta.yarn version synchronizationscripts/validate-yarn-config.js- New validation scriptdocs/yarn-configuration-fix.md- Comprehensive documentationsrc/tests/yarn-configuration.spec.ts- Test suite for configuration validationFixes #2919
Closes #2919
Before Fix