Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#1,277 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
firebase, javascript, node.js
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện vấn đề với [email protected], package firebase/auth và target trình duyệt/web của Metro. Điều tra việc lựa chọn môi trường trình biên dịch và xác minh rằng bản build cho trình duyệt không còn cố tải các dependency của Node.js; issue không nêu tên các file hoặc test cụ thể.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
JavaScript
Star
5.6k
Fork
702
Merge trung bình
2 ngày 20 giờ
Pull request đã merge (30 ngày)
60

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của react/metro

Tất cả issue của react/metro

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.