Skip to content

0.18 packager error #5393

Closed
Closed
@py110

Description

@py110

today when i upgrade from 0.17 to 0.18
run ios get following errors
image

Activity

facebook-github-bot

facebook-github-bot commented on Jan 19, 2016

@facebook-github-bot
Contributor

Hey py110, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or something is not working as you expect but not sure it's a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!
mylonelyplanet

mylonelyplanet commented on Jan 19, 2016

@mylonelyplanet

i have same issue too, even in a new project created by react-native init

carlos-wong

carlos-wong commented on Jan 19, 2016

@carlos-wong
Contributor

+1

carlos-wong

carlos-wong commented on Jan 19, 2016

@carlos-wong
Contributor

rm ./node_modules/react-native/node_modules/react-transform-hmr/node_modules/react-proxy/node_modules/react-deep-force-update/.babelrc I remove this file, then work

carlos-wong

carlos-wong commented on Jan 19, 2016

@carlos-wong
Contributor

@py110 maybe you can have a try

py110

py110 commented on Jan 20, 2016

@py110
Author
jiangqqlmj

jiangqqlmj commented on Jan 20, 2016

@jiangqqlmj

+1

sheldonhan

sheldonhan commented on Jan 20, 2016

@sheldonhan

+1

jevakallio

jevakallio commented on Jan 24, 2016

@jevakallio
Contributor

This root cause of the issue is that React Native uses Babel 6, which deprecated the use of the stage option on .babelrc files, and react-deep-force-update, a sub-dependency of React Native, still declares a .babelrc file with that option.

This is an issue with any third party modules that still use an older Babel in their own build process and do not clear the configuration files for the npm publish.

I have worked around the issue by adding the following npm run scripts to my package json:

  "scripts": {
    "clean:babelrc": "find ./node_modules -name react-packager -prune -o -name '.babelrc' -print | xargs rm -f",
    "postinstall": "npm run clean:babelrc"
  }

The script nukes all .babelrc files under the node_modules directory after every npm install, except the one under the react-packager directory, which is React Native packager uses to configure its own babel rules.

Note that this issue has been raised on Stack Overflow by a couple of users, in addition to the reports here:

jevakallio

jevakallio commented on Jan 24, 2016

@jevakallio
Contributor

I have not experienced this error myself (not on 0.18 in any of my apps yet), but it appears the depency tree that causes this error is the following:

The downstream dependencies below react-transform-hmr have since been updated to use Babel 6, but the latest react-transform-hmr still depends on react-proxy@1.1.1. We would need to upgrade the html library to the latest react-proxy@1.1.2 to resolve this issue.

I have opened an issue gaearon/react-transform-hmr#55 at react-transform-hmr to see if we can get this upgraded.

hi54yt

hi54yt commented on Jan 25, 2016

@hi54yt

+1

imruiyeah

imruiyeah commented on Jan 28, 2016

@imruiyeah

+1

Sanster

Sanster commented on Jan 30, 2016

@Sanster

+1

16 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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jsierles@vladp@minggo@imruiyeah@sheldonhan

        Issue actions

          0.18 packager error · Issue #5393 · facebook/react-native