Unable to create to install dependencies and run example
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 42/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js, react-native
- Ambito
- mobile-dev, tooling
Direzione di ricerca
Riproduci lo scaffold con npx create-react-native-library@latest, esegui yarn nel progetto generato e poi esegui yarn example android. Inizia da example/metro.config.js e dalla dipendenza react-native-monorepo-config, usando le versioni segnalate di Yarn 1.22.22 e Node; è completato quando le dipendenze vengono installate senza il workaround e l'esempio Android si avvia senza l'errore ESM di Metro.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
➜ main nvm ls
v20.12.2
-> v20.19.5
main npx create-react-native-library@latest awesome-library
✔ What is the name of the npm package? … react-native-awesome-library
✔ What is the description for the package? … Testing
✔ What is the name of package author? … 0xSuryax
✔ What is the email address for the package author? … [email protected]
✔ What is the URL for the package author? … https://github.com/0xSuryax
✔ What is the URL for the repository? … https://github.com/0xSuryax/react-native-awesome-library
✔ What type of library do you want to develop? › Turbo module
✔ Project created successfully at awesome-library!
Get started with the project:
$ yarn
Run the example app on iOS:
$ yarn example ios
Run the example app on Android:
$ yarn example android
See CONTRIBUTING.md for more details. Good luck!
➜ awesome-library git:(main) yarn
Usage Error: The nearest package directory (/Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library) doesn't seem to be part of the project declared in /Users/qwerty.
- If /Users/qwerty isn't intended to be a project, remove any yarn.lock and/or package.json file there.
- If /Users/qwerty is intended to be a project, it might be that you forgot to list RESEARCH/MY_OWN_LIBS/main/awesome-library in its workspace configuration.
- Finally, if /Users/qwerty is fine and you intend RESEARCH/MY_OWN_LIBS/main/awesome-library to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.
$ yarn install [--json] [--immutable] [--immutable-cache] [--check-cache] [--inline-builds] [--mode #0]
then i created an empty yarn.lock file then i m able to install dependencies
then i run yarn example android and i got
➜ ~ /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/node_modules/.generated/launchPackager.command ; exit;
error Error loading Metro config at: /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/metro.config.js
require() of ES Module /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/node_modules/react-native-monorepo-config/index.js from /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/metro.config.js not supported.
Instead change the require of index.js in /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/metro.config.js to a dynamic import() which is available in all CommonJS modules.
Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/node_modules/react-native-monorepo-config/index.js from /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/metro.config.js not supported.
Instead change the require of index.js in /Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/metro.config.js to a dynamic import() which is available in all CommonJS modules.
at Object. (/Users/qwerty/RESEARCH/MY_OWN_LIBS/main/awesome-library/example/metro.config.js:3:29)
Process terminated. Press to close the window
➜ ~ yarn --version
1.22.22
- Lingua principale
- JavaScript
- Stelle
- 3.2k
- Fork
- 227
- Merge medio
- 2g 23h
- PR unite (30g)
- 2
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 callstack/react-native-builder-bob
-
Doesn't work with NPMApertabug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
callstack/react-native-builder-bob#896 · 2 commenti ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
callstack/react-native-builder-bob#852 · 1 commento · 1 reazione ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
callstack/react-native-builder-bob#829 · 20 commenti ·
Tutte le issue di callstack/react-native-builder-bob
Issue simili
-
Link Checker ReportApertaautomated issue report
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
0. to triage bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
sindresorhus/eslint-plugin-unicorn#3825 ·
I maintainer di solito rispondono entro 1 giorno