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

Bundling 'index.android.js' [development, non-minified, hmr disabled] 0.0%(0/1), failed #15575

Closed
duanj3 opened this issue Aug 20, 2017 · 25 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@duanj3
Copy link

duanj3 commented Aug 20, 2017

Is this a bug report?
Yes
Have you read the Contributing Guidelines?
No
Environment
1.react-native -v:
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
2.node -v: v6.11.2
3.npm -v: v3.10.10
4.yarn --version: v0.27.5

Then, specify:
Platform: Android
Operating system: Windows 10 *64
Buidling tool: Android studio 2.3

Steps to Reproduce

  1. react-native init myapp
  2. cd myapp
  3. react-native run-android

I have tried to do the 'yarn remove babel-preset-react-native' and 'yarn add [email protected]', still didn't work for me.

Expected Behavior
Welcome to React Native Page

Actual Behavior
image

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:
{"message":"TransformError: C:\Users\Administrator\jiekeapp\index.android.js: Unexpected token ) (While processing preset: "C:\\Users\\Administrator\\jiekeapp\\node_modules\\babel-preset-react-native\\index.js")","type":"TransformError","lineNumber":0,"description":"","errors":[{"description":"","lineNumber":0}]}
processBundleResult
BundleDownloader.java:170
access$100
BundleDownloader.java:39
onResponse
BundleDownloader.java:139
execute
RealCall.java:135
run
NamedRunnable.java:32
runWorker
ThreadPoolExecutor.java:1113
run
ThreadPoolExecutor.java:588
run
Thread.java:818

This problem has got me stuck for 3 days, still can't solve it after I did a lot of searching. #15513 #15496 #15524 #14961
Thanks for helping me ahead of time!

@gsabatie
Copy link

i have the same issue on windows

@ChaosLcc
Copy link

+1

@ChaosLcc
Copy link

Bundling index.ios.js [development, non-minified, hmr disabled] 0.0% (0/1), failed.
error: bundling failed: "TransformError: /Users/guochao/Desktop/rndemo/AwesomeProject/index.ios.js: Unexpected token ) (While processing preset: "/Users/guochao/Desktop/rndemo/AwesomeProject/node_modules/babel-preset-react-native/index.js")"

@lndgalante
Copy link

lndgalante commented Aug 21, 2017

Same problem here with macOS 10.12.6, React Native 0.47.1, Node 8.4.0, react-native-cli: 2.0.1

@kitsoftwaregroup
Copy link

Any fix with this issue ?

@huzcNo1
Copy link

huzcNo1 commented Aug 21, 2017

Maybe because of "babel-preset-react-native": "3.0.0" , I have solved this problem by back to 2.1.0

@FaridSafi
Copy link

+1

@FaridSafi
Copy link

uninstalling watchman fixed my issue

@duanj3
Copy link
Author

duanj3 commented Aug 21, 2017

@FaridSafi dude, I don't think I have installed watchman, couldn't find it at all

@afeifly
Copy link

afeifly commented Aug 21, 2017

"babel-preset-react-native": "3.0.0" change to 2.1.0 . still same problem.

@duanj3
Copy link
Author

duanj3 commented Aug 21, 2017

@huzcNo1 I think I have downgraded the version of react-native, the current version of react-native-cli is 2.0.1, but still doesn't work, and how do you back it to 2.1.0?

@huzcNo1
Copy link

huzcNo1 commented Aug 21, 2017

@duanj3
yarn remove babel-preset-react-native
yarn add [email protected]

@duanj3
Copy link
Author

duanj3 commented Aug 21, 2017

@huzcNo1 yeah, that's exactly what I did before, and react-native-cli just automatically turned to 2.0.1, I mentioned in the issue as well, thanks anyway, have you got Wechat (QQ) or something if it doesn't bother you, cause I want to check that I didn't make it wrong

@huzcNo1
Copy link

huzcNo1 commented Aug 21, 2017

Can I have a look the file of package.json in your project @duanj3

@duanj3
Copy link
Author

duanj3 commented Aug 21, 2017

@huzcNo1
image
oh, it shows "babel-preset-react-native": "3.0.0", what can I do?

@huzcNo1
Copy link

huzcNo1 commented Aug 21, 2017

do this in the root dir of you project
yarn remove babel-preset-react-native
yarn add [email protected]

@ChaosLcc
Copy link

run android fail -- Bundling index.android.js [development, non-minified, hmr disabled] 0.0% (0/1), failed.
error: bundling failed: "TransformError: /Users/chaos/Desktop/demo/MyApp/index.android.js: Unexpected token ) (While processing preset: "/Users/chaos/Desktop/demo/MyApp/node_modules/babel-preset-react-native/index.js")"

run ios success...
Why?

@afeifly
Copy link

afeifly commented Aug 21, 2017

@huzcNo1 Thank you . in Mac, using npm remove and install 2.1.0, that work!

@duanj3
Copy link
Author

duanj3 commented Aug 21, 2017

omg, it is solved, thanks a lot, but new issue comes out...nearly broke down
image

@duanj3
Copy link
Author

duanj3 commented Aug 21, 2017

@huzcNo1 nothing to worry, I have fixed it, thank you so much, it has annoyed me for so long thanks

@duanj3 duanj3 closed this as completed Aug 21, 2017
@ChaosLcc
Copy link

@huzcNo1 I do this,then run ios success but run android failed...

@huzcNo1
Copy link

huzcNo1 commented Aug 21, 2017

my pleasure @duanj3 @afeifly

@huzcNo1
Copy link

huzcNo1 commented Aug 21, 2017

@guochao285575 I am sorrry , maybe I don't known how to fix the problem that you come across

@ChaosLcc
Copy link

@huzcNo1 thank you anyway

@lndgalante
Copy link

Guys this solution fixed the problem for me: #15332 (comment)

@facebook facebook locked as resolved and limited conversation to collaborators Aug 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

9 participants