globalClassNamePolyfill: AssetRegistry missing from react-native re-export whitelist
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- Dưới một giờ
- Mức phù hợp với người mới
- 87/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react-native, typescript
- Lĩnh vực
- mobile
Hướng nghiên cứu
Đọc src/components/index.cts và so sánh các getter của AppRegistry và AppState với export AssetRegistry được yêu cầu. Thêm getter được mô tả trong issue, sau đó build lại dist theo hướng dẫn. Hoàn tất khi AssetRegistry được re-export từ whitelist và bản distribution đã build có thay đổi này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug
With NativeWind v5 / globalClassNamePolyfill: true, Metro remaps import … from 'react-native' to react-native-css/components. That entry (src/components/index.cts) is a hand-maintained whitelist of RN exports.
AssetRegistry is not on the list. Callers such as expo-asset then do:
import { AssetRegistry } from 'react-native';
AssetRegistry.getAssetByID(id); // Cannot read property 'getAssetByID' of undefined
This breaks Material Symbol loading for Expo Router NativeTabs md icons (and any other expo-asset / font path that uses AssetRegistry).
Fix
Add the same getter pattern used for AppRegistry / AppState:
get AssetRegistry() {
return require("react-native").AssetRegistry;
},
after AppState in src/components/index.cts (and rebuild dist).
require("react-native") from inside this package stays on the real RN module because the Metro resolver treats react-native-css as internal and does not remapped it.
Environment
[email protected][email protected][email protected]/ Expo SDK 58expo-assetimportingAssetRegistryfromreact-native
Happy to open a PR if useful.
- Ngôn ngữ chính
- TypeScript
- Star
- 166
- Fork
- 45
- Merge trung bình
- 13 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của nativewind/react-native-css
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
nativewind/react-native-css#510 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 56/100
nativewind/react-native-css#509 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
nativewind/react-native-css#507 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 62/100
nativewind/react-native-css#481 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
nativewind/react-native-css#473 ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của nativewind/react-native-css
Issue tương tự
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrorsCó thể đã có người làm @as992949791 đã nhận hôm nay. Đang mởgood first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
reticlehq/reticle#2033 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:quality p3-medium ready-for-agent type:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
fderuiter/deruiter.dev#3589 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/react-admin#11431 ·
Maintainer thường phản hồi trong vòng 1 ngày