Skip to content

error: bundling failed: "TransformError [...] (While processing preset: node_modules [... \\babel-preset-react-native\\index.js")" #15545

Closed
@tudor2it

Description

@tudor2it

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

No

Environment

  1. react-native -v: react-native-cli: 2.0.1
  2. node -v: v6.11.2
  3. npm -v: 3.10.10
  4. yarn --version: not using

Then, specify:

  • Target Platform: Android
  • Development Operating System: Windows 7 Professional SP1 x86_64
  • Build tools: Android Studio 2.3.3, JRE 1.8.0_122, Android SDK Tools 26.0.2

Steps to Reproduce

(Write your steps here:)

  1. D:\path\path>react-native init project
  2. cd project
  3. react-native run-android

Expected Behavior

The welcome React-Native screen should appear on the emulator screen.

Actual Behavior

It throws the below error:

React packager ready.

Loading dependency graph, done.
Bundling `index.android.js`  [development, non-minified, hmr disabled]  ░░░░░░░░░░░░░
Bundling `index.android.js`  [development, non-minified, hmr disabled]  0.0% (0/1), f
ailed.
Bundling `index.android.js`  [development, non-minified, hmr disabled]  ░░░░░░░░░░░░░
error: bundling failed: "TransformError: D:\\path\\path\\project\\index.android.js: Unex
pected token ) (While processing preset: \"D:\\\\path\\\\path\\\\project\\\\node_modules
\\\\babel-preset-react-native\\\\index.js\")"

image

Reproducible Demo

It is an empty standard project as it is described in https://facebook.github.io/react-native/docs/getting-started.html > Building Projects with Native Code.

Activity

Kennytian

Kennytian commented on Aug 18, 2017

@Kennytian

some issue +1

@tudor2it work around: npm install --save-dev babel-preset-react-native@2.1.0

emilioicai

emilioicai commented on Aug 18, 2017

@emilioicai
Contributor

+1
@Kennytian workaround fixed it

tudor2it

tudor2it commented on Aug 18, 2017

@tudor2it
Author

@Kennytian Thank you for the solution. I have known about the workaround. The issue has appeared a few days ago and I've expected to disappear. But it is still there and it's frustrating that the react-native team didn't fix it. I'm desperate to finish a project and I'm only struggling with all kind of errors because versions of packages and compilers don't match.

snoo-mpl

snoo-mpl commented on Aug 18, 2017

@snoo-mpl

+1
workaround didnt fix it in my app:

npm: 5.0.1
react-native-cli: 2.0.1
react-native: 0.47.1
node: v7.9.0

charpeni

charpeni commented on Aug 18, 2017

@charpeni
Contributor
facebook-github-bot

facebook-github-bot commented on Aug 18, 2017

@facebook-github-bot
Contributor

Duplicate of #15513

ShubhamBabhulkar

ShubhamBabhulkar commented on Aug 19, 2017

@ShubhamBabhulkar

for yarn used following Commands

yarn remove babel-preset-react-native
yarn add babel-preset-react-native@2.1.0

for npm used following Commands

npm uninstall babel-preset-react-native
npm install babel-preset-react-native@2.1.0

oliverraf

oliverraf commented on Aug 20, 2017

@oliverraf

This works like a charm

@tudor2it work around: npm install --save-dev babel-preset-react-native@2.1.0

kwesihackman

kwesihackman commented on Aug 20, 2017

@kwesihackman

workaround fixed it for me

gjvpaet

gjvpaet commented on Aug 20, 2017

@gjvpaet

@Kennytian workaround fixed it thanks!

uurtsaikhb

uurtsaikhb commented on Aug 21, 2017

@uurtsaikhb

@Kennytian workaround fixed it, thank you

jmacias54

jmacias54 commented on Aug 21, 2017

@jmacias54

@Kennytian fixed it, thank you so much

vegano1

vegano1 commented on Aug 25, 2017

@vegano1

@ShubhamBabhulkar This fixed my issue as well. Thank you.

17 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @emilioicai@kwesihackman@Kennytian@imchathu87@facebook-github-bot

        Issue actions

          error: bundling failed: "TransformError [...] (While processing preset: node_modules [... \\babel-preset-react-native\\index.js")" · Issue #15545 · facebook/react-native