-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Error: While resolving module, the Haste package was found. the module could not be found within the package #35832
Comments
Can you try to wipe Metro cache with |
Same error
|
Hi @PritishSawant! I believe this is because you have located the Specifically, this legacy package resolution suffixes all import subpaths based on The fix in this case is to omit the source extension: - import RTNCalculator from 'rtn-calculator/js/NativeCalculator.js';
+ import RTNCalculator from 'rtn-calculator/js/NativeCalculator'; I've tested this workaround locally against your repro using |
Can you confirm you've run the TurboModule codegen for Android? Particularly these parts: This is because I don't observe the |
Please note that once you run If the issue persists, could you share a reproducer? |
Yup I am looking in the node_modules folder. I don't see build folder in android. Below is the screenshot The repo is here |
@cortinico Do you want me to open another issue? |
Nope sorry. The issue you're facing now has already been addressed and is solved in React Native 0.71.1 Reference to the underlying issue is: |
it helped me, thankyou! |
Description
I am trying the new arch of react native. I have enabled it in my gradle.properties file. This error is for android only and I have not tried iOS yet.
I am following the exact sample of Calculator mentioned over here.
I get an error saying
The complete repo is here
Version
0.71.0
Output of
npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.1
CPU: (8) x64 Apple M1
Memory: 41.52 MB / 8.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /opt/homebrew/bin/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: 2022.1 AI-221.6008.13.2211.9477386
Xcode: 14.2/14C18 - /usr/bin/xcodebuild
Languages:
Java: javac 16 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: 0.71.0 => 0.71.0
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
npm install
yarn react-native run-android --active-arch-only
Snack, code example, screenshot, or link to a repository
Repo
The text was updated successfully, but these errors were encountered: