Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: flakey CI asdf node version (#9934)
## **Description** Fix flakey CI failing on Node v16 instead of using Node v20 (set in: package.json, bitrise.yml, .nvmrc) ```console $ yarn "setup" yarn run v1.22.22 error metamask@7.24.0: The engine "node" is incompatible with this module. Expected version "^20.12.2". Got "16.20.2" error Commands cannot run with an incompatible environment. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. Run: provided yarn command failed: exit status 1 ``` ```console TEST_SUITE_FOLDER value is: ./e2e/specs/confirmations/* TEST_SUITE_TAG value is: .*SmokeConfirmations.* /root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22762 throw new Error( ^ Error: Error when performing the request to https://registry.npmjs.org/yarn/latest; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting at fetch (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22762:11) at async fetchAsJson (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22776:20) ... 4 lines matching cause stack trace ... at async Object.runMain (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:24232:5) { [cause]: TypeError: globalThis.fetch is not a function at fetch (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22756:33) at async fetchAsJson (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22776:20) at async fetchLatestStableVersion (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22703:20) at async fetchLatestStableVersion2 (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:22826:14) at async Engine.getDefaultVersion (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:23433:23) at async Engine.executePackageManagerRequest (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:23525:47) at async Object.runMain (/root/.asdf/installs/nodejs/16.20.2/lib/node_modules/corepack/dist/lib/corepack.cjs:24232:5) } ``` - remove asdf to setup node - add [bitrise-nvm-step](https://github.com/Almouro/bitrise-nvm-step) if flakiness continues, consider removing `/root/.asdf/installs/nodejs/16.20.2` ## **Related issues** Fixes: CI ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: legobeat <legobeat@anonymous.com> Co-authored-by: legobt <6wbvkn0j@anonaddy.me> Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
- Loading branch information