Skip to content

Conversation

@praneeth622
Copy link

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:

  • Update volta.yarn from 4.0.2 to 4.6.0 in package.json
  • Add validate-yarn-config script to prevent future regressions
  • Add comprehensive documentation for the fix
  • Add TypeScript test suite to validate yarn configuration consistency

Problem

Users experienced SyntaxError: missing ) after argument list when running yarn on fresh clones. This occurred because:

  • volta.yarn was set to 4.0.2
  • packageManager was set to [email protected]
  • .yarnrc.yml pointed to .yarn/releases/yarn-4.6.0.cjs

This 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

  • Synchronized all yarn version references to 4.6.0 across all configuration files
  • Added validation script (scripts/validate-yarn-config.js) to detect version mismatches
  • Added comprehensive test suite to prevent future regressions
  • Added documentation explaining the fix and maintenance procedures

Testing

  • ✅ Verified yarn installation works on fresh clones
  • ✅ Validated all configuration files are synchronized
  • ✅ Confirmed existing development workflows remain unaffected
  • ✅ Added automated tests to prevent future regressions

Files Changed

  • package.json - Fixed volta.yarn version synchronization
  • scripts/validate-yarn-config.js - New validation script
  • docs/yarn-configuration-fix.md - Comprehensive documentation
  • src/tests/yarn-configuration.spec.ts - Test suite for configuration validation

Fixes #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)
    ...

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:
- Update volta.yarn from 4.0.2 to 4.6.0 in package.json
- Add validate-yarn-config script to prevent future regressions
- Add comprehensive documentation for the fix

Fixes RocketChat#2919
@casalsgh casalsgh requested a review from jeanfbrito October 10, 2025 13:55
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

Successfully merging this pull request may close these issues.

On fresh clone yarn throws error on desktop app

1 participant