fix: resolve yarn version synchronization causing SyntaxError on fresh clones #3099
+387
−2
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.
Fix version synchronization issue where volta.yarn was set to 4.0.2 while packageManager was set to [email protected], 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 to[email protected].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
$ git clone https://github.com/RocketChat/Rocket.Chat.Electron.git $ cd Rocket.Chat.Electron $ yarn SyntaxError: missing ) after argument list at wrapSafe (internal/modules/cjs/loader.js:1029:16) ...