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

Issue while running npm run android #942

Closed
vaultcode opened this issue May 30, 2018 · 5 comments
Closed

Issue while running npm run android #942

vaultcode opened this issue May 30, 2018 · 5 comments

Comments

@vaultcode
Copy link

vaultcode commented May 30, 2018

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 from C:\\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 the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm 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

@uasaigoli
Copy link

uasaigoli commented May 30, 2018

I have similar issue in mac.

error: bundling failed: "Unable to resolve module theme from /Users/newuser/github/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 the node_modules folder: rm -rf node_modules && npm install.\n 3. Reset packager cache: rm -fr $TMPDIR/react-* or npm start -- --reset-cache."

@mlabieniec
Copy link
Contributor

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.

@uasaigoli
Copy link

Issue resolved after replacing following line -

import { colors } from 'theme';
with
import { colors } from '../Utils/theme';

changed were in 15-16 files

@nidsharm
Copy link

nidsharm commented May 31, 2018

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.

@github-actions
Copy link

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 *-help channels or Discussions for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants