fix(with-e2e): fresh npm install fails with an e2e peer dependency conflict
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 66/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- nodejs, react-native
- Ambito
- developer-experience, mobile
Direzione di ricerca
Inizia dal blocco devDependencies in with-e2e/package.json (righe 23-32), dove gli intervalli di e2e e @e2e-dev/mobile sono in conflitto. Riproduci eseguendo npm install in una copia nuova senza lockfile per vedere l'errore ERESOLVE. È completato quando l'installazione riesce senza --force o --legacy-peer-deps e la versione risolta di e2e soddisfa l'intervallo di peer dell'adattatore mobile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
A fresh with-e2e example cannot install its JavaScript dependencies with npm. Its e2e core range and the mobile adapter selected by its tilde range have incompatible peer requirements, so the documented setup stops before the app or tests can run.
Runtime or environment
- Example: current
master, commit2cc7a440b01eb30e326b91cf1f3aae41e749d128, with no lockfile inwith-e2e/. - Platform: macOS on Apple silicon; Node.js 26.12.1; npm 12.2.1 and 12.2.2 (latest published npm, with the same failure).
- Documented scaffolding path: create-expo 5.1.7, the latest published release checked.
- Example ranges:
e2e ~0.21.3,@e2e-dev/mobile ~0.12.4,@e2e-dev/eas ~0.3.2, and@e2e-dev/web ~0.15.3. - Resolved mobile adapter:
@e2e-dev/mobile 0.12.6; its publishede2epeer range is>=0.22.1 <1. The preceding mobile patch,0.12.5, declares>=0.15.0 <1. - Verified workaround set: e2e 0.23.0, eas 0.3.3, mobile 0.12.6, and web 0.15.5, selected by
e2e upgrade.
Steps to reproduce
Using the supported Node runtime above, either follow the README's scaffolding path:
npx -y create-expo@latest example-app --example with-e2e --yes
or install an untouched copy of the example directly:
git clone --depth 1 https://github.com/expo/examples.git
cp -R examples/with-e2e example-copy
cd example-copy
npm install
Both paths were executed. No Expo login, native build, hosted simulator session, or workflow is needed to reach the error.
Expected behavior
The example's documented setup should install a mutually compatible dependency set without bypassing npm's peer dependency checks.
Actual behavior
The direct npm install exits 1 with:
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error dev e2e@"~0.21.3" from the root project
npm error Could not resolve dependency:
npm error peer e2e@">=0.22.1 <1" from @e2e-dev/[email protected]
npm error dev @e2e-dev/mobile@"~0.12.4" from the root project
The scaffold downloads the example but its npm install fails with the same conflict. create-expo then prints that JavaScript dependency installation failed and continues creating the project; the scaffold command itself exits 0, leaving dependencies uninstalled.
In a disposable copy, E2E_TELEMETRY_DISABLED=1 npx -y e2e@latest upgrade updated the e2e packages to the workaround set above and its npm install completed successfully. This verified dependency installation only; no application build or test run was performed for this report.
Evidence
- Expected source: The example's How to use instructions offer the scaffolding command as its setup path.
- Failure source: The two executed setup paths above, with the npm error excerpt retained inline; the example's devDependencies define the incompatible ranges.
- Evidence provenance: observed
- Local verification: reproduced
- Reproduction completeness: complete
The peer-range difference can be checked without installing the example:
npm view @e2e-dev/[email protected] peerDependencies
npm view @e2e-dev/[email protected] peerDependencies
This report concerns the example's installable dependency set. The adapter's peer-range change is context, rather than a request to change the adapter's compatibility contract here.
Restoration check
From a fresh copy with no lockfile or node_modules, both the direct npm install and the README's scaffolding path should install successfully on a supported Node runtime, with peer dependency checks enabled and no --force or --legacy-peer-deps override. Confirm that the resolved e2e packages agree on their peer requirements.
Triage assessment
- Impact level: P2
- Assessment status: supported
- Impact basis: Fresh users of this specific example cannot complete dependency installation through either tested setup path; other examples were not assessed.
- Workaround status: available
- Workaround basis: Running the released e2e upgrade command in a disposable copy selected a compatible package set and completed npm installation without disabling peer checks.
- Lingua principale
- TypeScript
- Stelle
- 3.8k
- Fork
- 1.1k
- Merge medio
- 1g 14h
- PR unite (30g)
- 1
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di expo/examples
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 62/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Package dependency issue with react-three-fiber exampleForse già presa @BrandonMontford-1 l’ha presa 146 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 58/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
Tutte le issue di expo/examples
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
g1331/phantom-circuit#93 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
compiler
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
HerringtonDarkholme/hd-lang#1699 ·
I maintainer di solito rispondono entro 1 giorno
-
account bug communication lecture
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno