-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
This is a placeholder issue meant to provide instructions for anyone who encounters this error during the build-tools self-update process.
When build-tools updates itself, it first does a git pull and then a yarn install. Unfortunately, with our recent migration to Yarn 4 this causes an issue, because the old code runs npx yarn --prod, which in this case causes the following error:
Running "npx yarn --prod" in C:\Users\itsananderson\.electron_build_tools
ERROR Error: Command failed: npx yarn --prod
at genericNodeError (node:internal/errors:984:15)
at wrappedFn (node:internal/errors:538:14)
at checkExecSyncError (node:child_process:891:11)
at Object.execSync (node:child_process:963:15)
at Command.checkForUpdates (C:\Users\itsananderson\.electron_build_tools\src\e-auto-update.js:126:10)
at Command.listener [as _actionHandler] (C:\Users\itsananderson\.electron_build_tools\node_modules\commander\lib\command.js:480:17)
at C:\Users\itsananderson\.electron_build_tools\node_modules\commander\lib\command.js:1234:65
at Command._chainOrCall (C:\Users\itsananderson\.electron_build_tools\node_modules\commander\lib\command.js:1151:12)
at Command._parseCommand (C:\Users\itsananderson\.electron_build_tools\node_modules\commander\lib\command.js:1234:27)
at Command.parse (C:\Users\itsananderson\.electron_build_tools\node_modules\commander\lib\command.js:889:10)
This happens because Yarn 4 does not accept a --prod parameter. After the upgrade, the new build-tools code instead runs yarn install --immutable which is supported by Yarn 4.
To fix this error, you can use the following commands to manually run the Yarn install:
cd ~/.electron_build_tools
yarn install --immutable
nikwen
Metadata
Metadata
Assignees
Labels
No labels