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

Error when I try to upgrade to react-native 0.57.0 #20723

Closed
3 tasks done
ferily7 opened this issue Aug 17, 2018 · 4 comments
Closed
3 tasks done

Error when I try to upgrade to react-native 0.57.0 #20723

ferily7 opened this issue Aug 17, 2018 · 4 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@ferily7
Copy link

ferily7 commented Aug 17, 2018

Environment

System:
  OS: Windows 10
  CPU: x64 Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz
  Memory: 5.89 GB / 15.84 GB
Binaries:
  npm: 5.6.0 - C:\Program Files\nodejs\npm.CMD
  Watchman: 4.9.4 - C:\Users\User\watchman\watchman.EXE
IDEs:
  Android Studio: Version  3.1.0.0 AI-173.4907809

Description

When I try to upgrade my version from 0.56 to 0.57, I am getting some kind of error with the babel-preset-react native:

git-upgrade ERR! An error occurred during upgrade:
git-upgrade ERR! Error: Plugin 0 specified in "C:\\Users\\User\\Documents\\Test\\node_modules\\babel-preset-react-native\\index.js" provided an invalid property of "default" (While processing preset: "C:\\Users\\User\\Documents\\Test\\node_modules\\babel-preset-react-native\\index.js")
    at Plugin.init (C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\plugin.js:131:13)
    at Function.normalisePlugin (C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:152:12)
    at C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:184:30
    at Array.map (<anonymous>)
    at Function.normalisePlugins (C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:158:20)
    at OptionManager.mergeOptions (C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:234:36)
    at C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:265:14
    at C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:323:22
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (C:\Users\User\AppData\Roaming\npm\node_modules\react-native-git-upgrade\node_modules\babel-core\lib\transformation\file\options\option-manager.js:275:20)
git-upgrade ERR! Restore initial sources
Note: checking out 'project-snapshot'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at 43d94ce Project snapshot

Reproducible Demo

react-native init Test
cd Test
react-native-git-upgrade
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@mikalai-s
Copy link

@ferily7 In my case reverting babel-preset-react-native fixed the issue.

Run

npm install babel-preset-react-native@4.0.0 --save-dev

And check whether that fixes this particular issue.

@kelset
Copy link
Collaborator

kelset commented Aug 18, 2018

Duplicate of #20710

@kelset kelset marked this as a duplicate of #20710 Aug 18, 2018
@kelset kelset closed this as completed Aug 18, 2018
@zhuanghongji
Copy link

@ferily7 In my case reverting babel-preset-react-native fixed the issue.

Run

npm install babel-preset-react-native@4.0.0 --save-dev

And check whether that fixes this particular issue.

It worked for me.

@facebook facebook locked as resolved and limited conversation to collaborators Aug 18, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Aug 18, 2019
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

5 participants