Skip to content

Commit ff5d87d

Browse files
committed
Fix E2E template install in CI jobs (facebook#43323)
Summary: Pull Request resolved: facebook#43323 This fixes a seemingly pre-existent misconfiguration within our `test_ios_template` E2E test setup in CircleCI. **Background** We call `npx react-native-community/cli init` with the `--skip-install` flag, as part of the bootstrapping logic in `scripts/e2e/init-template-e2e.js`. This is necessary because we later want to explicitly call `npm install` with a custom `--registry` for our locally mirrored packages (via Verdaccio). For some reason, we were observing unexpected differences when this was run under CircleCI: 1. Runs `yarn init` 2. Runs a `yarn add` (unknown pkg) {F1464781818} https://app.circleci.com/pipelines/github/facebook/react-native/42725/workflows/f648468b-e916-4501-887d-ad293aa6fccf/jobs/1398950 This is causing a Yarn-based install ahead of where we want — ignoring the `--skip-install` flag. *I'm still unsure on the exact LOC cause in CLI* (but most likely, it's around the Yarn v3 move). **Impact of this fix** - The above meant that, when we were bootstrapping `test_ios_template` previously, packages weren't being read from Verdaccio, but **instead from npm** — using the `"0.74.0"` versions from the *previous branch cut* ❌. - After D54006327, this behaviour became breaking 💀 — since for the 0.74 -> 0.75 cut, we no longer physically published `"0.75.0-main"` (new format) packages to npm. **This change** I'm passing `--pm npm` to `npx react-native-community/cli init` to skip around any Yarn behaviour. This appears to have removed the erroneous `yarn` invocations ✅. Changelog: [Internal] bypass-github-export-checks Reviewed By: cortinico, cipolleschi Differential Revision: D54536848 fbshipit-source-id: 473b11924955f5787c82a6c81d4527d77b810aa5
1 parent 4e677f0 commit ff5d87d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/e2e/init-template-e2e.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ async function initNewProjectFromSource(
121121
--directory ${directory} \
122122
--template ${templatePath} \
123123
--verbose \
124-
--skip-install \
125-
--yarn-config-options npmRegistryServer="${VERDACCIO_SERVER_URL}"`,
124+
--pm npm \
125+
--skip-install`,
126126
{
127127
// Avoid loading packages/react-native/react-native.config.js
128128
cwd: REPO_ROOT,

0 commit comments

Comments
 (0)