Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Bundling for Web attempts to import node.js modules from dependencies due to improper compiler environment selection

Aperta
#1,277 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
firebase, javascript, node.js
Ambito
build-system

Direzione di ricerca

Inizia riproducendo il problema con [email protected], il pacchetto firebase/auth e un target browser/web di Metro. Analizza la selezione dell’ambiente del compilatore e verifica che la build per browser non tenti più di caricare dipendenze Node.js; l’issue non indica file o test specifici.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Do you want to request a feature or report a bug?

Report a Bug

What is the current behavior?

When importing libraries like 'firebase' who depend use 'browser' as the main target and compiling for a metro 'browser' / web target the compiler still attempts to load node.js dependencies when it should not.

This has been previously reported to firebase-js-sdk but their staff believe this is a metro compiler issue.

See https://github.com/firebase/firebase-js-sdk/issues/7849#issuecomment-1857889012

If the current behavior is a bug, please provide the steps to reproduce and a minimal repository on GitHub that we can yarn install and yarn test.

I will attempt to build you a repository for testing this as soon as I can.

This is easily reproduce when importing [email protected] and attempting to access the firebase/auth package.

What is the expected behavior?

Only browser dependencies should load in a browser-based build.

Please provide your exact Metro configuration and mention your Metro, node, yarn/npm version and operating system.

Lingua principale
JavaScript
Stelle
5.6k
Fork
702
Merge medio
3g 2h
PR unite (30g)
44

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di react/metro

Tutte le issue di react/metro

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.