-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Issue while running npm run android #942
Comments
I have similar issue in mac. error: bundling failed: "Unable to resolve module |
Looks like this is a RN error not finding "theme" in Screens/First.js. What is the module "theme" your including? If it's a module you have installed, you should try the info suggested i.e. clear modules/cache etc. |
Issue resolved after replacing following line - import { colors } from 'theme'; changed were in 15-16 files |
Hi @vaultcode , I tried out our React Native starter from scratch on Android and iOS and couldn't reproduce the issue. Have you made any changes to the project since you cloned it? If not, I think the issue is with the node modules dependencies. We use providesModule here : https://github.com/aws-samples/aws-mobile-react-native-starter/blob/1943bec3b374ca9df60197310ab2e31cccb18492/client/src/Utils/theme.js#L2 to not use the complete path to 'theme' module. Thanks. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
The development server returned response error code: 500
URL: http://10.0.2.2:8081/index.android.bundle?platform=android&dev=true&hot=false&minify=false
Body:
{"from":"C:\Users\UserName\my-project\src\Screens\First.js","to":"theme","message":"Unable to resolve module
theme
fromC:\\Users\\UserName\\my-project\\src\\Screens\\First.js
: Module does not exist in the module map\n\nThis might be related to https://github.com/facebook/react-native/issues/4968\nTo resolve try the following:\n 1. Clear watchman watches:watchman watch-del-all
.\n 2. Delete thenode_modules
folder:rm -rf node_modules && npm install
.\n 3. Reset packager cache:rm -fr $TMPDIR/react-*
ornpm start -- --reset-cache
.","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]}processBundleResult
BundleDownloader.java:170
access$100
BundleDownloader.java:39
onResponse
BundleDownloader.java:139
execute
RealCall.java:135
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1167
run
ThreadPoolExecutor.java:641
run
Thread.java:764
The text was updated successfully, but these errors were encountered: