Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用最新版本的react-native-cli安装@ant-design/react-native后在Ios上面报这个错 #1293

Open
sparGuan opened this issue Mar 21, 2023 · 4 comments

Comments

@sparGuan
Copy link

error: Error: Unable to resolve module @react-native-community/slider from /Users/mac/Desktop/project/EduApp/node_modules/@ant-design/react-native/lib/slider/index.js: @react-native-community/slider could not be found within the project or in these directories:
node_modules/@ant-design/react-native/node_modules
node_modules

@sparGuan
Copy link
Author

image

@sparGuan
Copy link
Author

System:
OS: macOS 13.2.1
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 108.79 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.15.0 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 9.5.0 - /usr/local/bin/npm
Watchman: 2023.03.13.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.0 - /Users/mac/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_211 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.4 => 0.71.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

@xiongxiongjiang
Copy link

+1

@MuNitCat
Copy link

error: Error: Unable to resolve module @react-native-community/slider from /Users/mac/Desktop/project/EduApp/node_modules/@ant-design/react-native/lib/slider/index.js: @react-native-community/slider could not be found within the project or in these directories: node_modules/@ant-design/react-native/node_modules node_modules

仔细看error内容,这个是缺少了依赖, 你需要执行

yarn add @react-native-community/segmented-control @react-native-community/slider react-native-gesture-handler

具体内容在这里 https://rn.mobile.ant.design/docs/react/upgrade-notes-cn
这个属于文档没写明白的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants