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

react-native-git-upgrade Error: Cannot find module 'AccessibilityInfo' #22040

Closed
2 of 3 tasks
vitorreis opened this issue Oct 31, 2018 · 3 comments
Closed
2 of 3 tasks
Labels

Comments

@vitorreis
Copy link

vitorreis commented Oct 31, 2018

Environment

 React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
      Memory: 229.52 MB / 16.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 8.9.0 - ~/.nvm/versions/node/v8.9.0/bin/node
      npm: 6.4.1 - ~/.nvm/versions/node/v8.9.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: ^16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
      react-native: ^0.57.4 => 0.57.4
    npmGlobalPackages:
      create-react-native-app: 1.0.0
      react-native-cli: 2.0.1
      react-native-git-upgrade: 0.2.7

Description

When I attempt to upgrade my react project to the latest version, the react-native-git-upgrade crashes with an error.

I am attempting to upgrade a project created with CRNA -> Ejected in the version RN 0.55.x

react-native-git-upgrade
git-upgrade info Check for updates
git-upgrade info Read package.json files
git-upgrade info Check declared version
git-upgrade info Check matching versions
git-upgrade info Check React peer dependency
git-upgrade info Check that Git is installed
git-upgrade info Get information from NPM registry
git-upgrade info Upgrading to React Native 0.57.4, React 16.6.0-alpha.8af6728
git-upgrade info Setup temporary working directory
git-upgrade info Configure Git environment
git-upgrade info Init Git repository
git-upgrade info Add all files to commit
warning: CRLF will be replaced by LF in android/gradlew.bat.
The file will have its original line endings in your working directory.
git-upgrade info Commit current project sources
git-upgrade info Create a tag before updating sources
git-upgrade info Generate old version template
git-upgrade info Add updated files to commit
warning: CRLF will be replaced by LF in android/gradlew.bat.
The file will have its original line endings in your working directory.
git-upgrade info Commit old version template
git-upgrade info Install the new version
npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.

git-upgrade info Generate new version template
git-upgrade ERR! An error occurred during upgrade:
git-upgrade ERR! Error: Couldn't find preset "module:metro-react-native-babel-preset" relative to directory "MY_APP_PATH"
    at /Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (<anonymous>)
    at OptionManager.resolvePresets (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at compile (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-register/lib/node.js:103:45)
    at loader (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-register/lib/node.js:144:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/v.reis/.nvm/versions/node/v8.9.0/lib/node_modules/react-native-git-upgrade/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:554:32)
git-upgrade ERR! Restore initial sources

Can someone offer guidance in how to upgrade the project in this condition?

how to reproduce

For example try to upgrade this project: https://github.com/vitorreis/react-native-braze-sdk-app

@rajivshah3
Copy link
Contributor

Hmm, this looks similar to #22007. Have you tried the solution suggested there?

@vitorreis
Copy link
Author

@rajivshah3 thanks for answering... I checked the issue, this happens even without having .babelrc file...
You can reproduce it in this with this repo (simple app ejected in 0.55.2) https://github.com/vitorreis/react-native-braze-sdk-app

@thymikee
Copy link
Contributor

react-native-git-upgrade is now deprecated. Please use automatic react-native upgrade if you're on 0.59+ or manual rn-diff-purge which upgrade uses under the hood

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

No branches or pull requests

5 participants