ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3.05k stars 611 forks source link

[Bug] expo 引用ant mobile rn组件报错 #1301

Closed UvDream closed 7 months ago

UvDream commented 1 year ago

💬 Before You Start

🙋 Description/Step to reproduce

image

一旦引用组件就报错,请问这是咋肥事,不引用就没问

💻 Environment

Expo

⚫️ Output of npx react-native info

System: OS: macOS 13.3.1 CPU: (10) arm64 Apple M1 Max Memory: 419.91 MB / 32.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 18.14.0 - ~/.nvm/versions/node/v18.14.0/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 9.3.1 - ~/.nvm/versions/node/v18.14.0/bin/npm Watchman: Not Found Managers: CocoaPods: 1.11.3 - /Users/wzj/.rvm/gems/ruby-2.7.5/bin/pod SDKs: iOS SDK: Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4 Android SDK: API Levels: 31, 32 Build Tools: 30.0.3, 31.0.0 System Images: android-31 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.10121639 Xcode: 14.3/14E222b - /usr/bin/xcodebuild Languages: Java: Not Found npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.71.8 => 0.71.8 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Additional comments

No response

necromancer1 commented 1 year ago

Same. Is there any update on this issue?

lengziyu commented 1 year ago

同样遇到,请问解决了没?

wangshu-g commented 1 year ago

遇到了同样的问题,请问有什么反馈吗?

UvDream commented 1 year ago

没人理啦

1uokun commented 1 year ago

我们看下

1uokun commented 1 year ago

历史原因,expo项目不支持@react-native-camera-roll/camera-roll<ImagePicker>组件,在expo项目里请更换npm源

 "dependencies": {
-    "@react-native-camera-roll/camera-roll": "x.x.x",
+    "@react-native-camera-roll/camera-roll": "npm:expo-media-library@15.4.1",
}
image

Originally posted by @harrigee in https://github.com/react-native-cameraroll/react-native-cameraroll/issues/458#issuecomment-1446554141


expo项目如遇到其他问题可参考 expo/babel.config.jsexpo/webpack.config.js 配置文件

1uokun commented 7 months ago

<ImagePicker /> has been deprecated in 5.1.0