Skip to content

[android / ios] bundling failed: "TransformError #15513

Closed
@esganzerla

Description

@esganzerla

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v:
    react-native-cli: 2.0.0
    react-native: n/a - not inside a React Native project directory
    (I was inside the folder, version is: 0.47.1)
  2. node -v: v7.10.0
  3. npm -v: 4.2.0
  4. yarn --version: 0.17.10

Then, specify:

  • Target Platform: Android, iOS
  • Development Operating System: macOS Sierra 10.12.6
  • Build tools: Using Xcode 8.3.3 and Android Studio 2.3

Steps to Reproduce

  1. react-native init rn_reproduce_transform_error
  2. cd rn_reproduce_transform_error
  3. react-native run-ios or react-native run-android

Expected Behavior

Should show the default "Welcome to React Native!" screen.

Actual Behavior

bundling failed: "TransformError: /Users/eduardo/Desktop/rn_reproduce_transform_error/index.ios.js: Unexpected token ) (While processing preset: "/Users/eduardo/Desktop/rn_reproduce_transform_error/node_modules/babel-preset-react-native/index.js")"

Same error occurs when I tried to update RN version to 0.48.0-rc.1
SyntaxError: Unexpected token )

Reproducible Demo

https://github.com/esganzerla/rn_reproduce_transform_error

Notes

Activity

tmartres

tmartres commented on Aug 16, 2017

@tmartres

Had the same issue and after restarting my computer the issue went away for me. You might have to just close and restart your terminal and simulator too.

phillip-winder

phillip-winder commented on Aug 16, 2017

@phillip-winder

+1

experiencing the same issue on run-android aswell as run-ios

amerej

amerej commented on Aug 16, 2017

@amerej

@tmartres Restarting don't work for me

esganzerla

esganzerla commented on Aug 16, 2017

@esganzerla
Author

Restarting didn't help here too.

esganzerla

esganzerla commented on Aug 16, 2017

@esganzerla
Author

I've just found a workaround:

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

The hole is probably deeper, but that is works for me.

jarecsni

jarecsni commented on Aug 16, 2017

@jarecsni

I've tried to create a new RN app by RNCA (Expo) and then eject it. Works perfectly fine, although it runs on React Native 0.46.1, so I'm guessing this is an issue with 0.47.

charpeni

charpeni commented on Aug 16, 2017

@charpeni
Contributor

Thank you for reporting and for the workaround @esganzerla.

It seems an issue with babel-preset-react-native@3.0.0 that was released earlier.

@jeanlauliac How should we fix this issue? Add a specific major version in react-native-cli? Or something has been planned?

`jest babel-jest babel-preset-react-native react-test-renderer@${reactVersion}`

cc @ericnakagawa who's on call.

charpeni

charpeni commented on Aug 16, 2017

@charpeni
Contributor

@facebook-github-bot label Tooling

sachinwak

sachinwak commented on Aug 16, 2017

@sachinwak

uninstalling and installing babel-preset-react-native works for me thanks a lot @esganzerla

ivanzotov

ivanzotov commented on Aug 16, 2017

@ivanzotov
Contributor

Spent a lot of time trying to fix this issue, PR #15516 but I still don't understand why it works.

ivanzotov

ivanzotov commented on Aug 16, 2017

@ivanzotov
Contributor

I just moved plugins from plugins.push(... to const plugins = [...]

37 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

        @cpojer@ivanzotov@coryarmbrecht@varunagg45@jarecsni

        Issue actions

          [android / ios] bundling failed: "TransformError · Issue #15513 · facebook/react-native