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

Unable to resolve module @unimodules/core with Expo SDK 43 expo-constants "~11.0.1" #1563

Closed
koch-aivy opened this issue Nov 3, 2021 · 4 comments
Labels
released This feature/bug fix has been released

Comments

@koch-aivy
Copy link

koch-aivy commented Nov 3, 2021

Describe the bug

Unable to resolve module @unimodules/core from /path-to-app/node_modules/@bugsnag/expo/node_modules/expo-constants/build/Constants.js

Constants.js tries to import from @ unimodules/core, which is deprecated from expo SDK 43 (e.g. described here, everything was moved to expo-modules-core) https://blog.expo.dev/whats-new-in- expo-modules-infrastructure-7a7cdda81ebc
The lib seems to use an older version of expo-constants, because in e expo-constants version "~ 12.1.1" it already gets imported from expo-modules-core. what options do I have here?

Steps to reproduce

  1. Update expo sdk 43
  2. Install bugsnag
  3. expo install expo-constants
  4. See error

Environment

  • Bugsnag version:@bugsnag/expo": "^7.13.2", "@bugsnag/js": "^7.13.2", "@bugsnag/plugin-react": "^7.1.0",
  • Browser framework version (if any):
    • react-native: "0.64.2",
  • Device (e.g. iphonex): iPhone 12 simulator
Error messages:

Unable to resolve module @unimodules/core from /Users/leonie/Repos/aivy-multi-app/node_modules/@bugsnag/expo/node_modules/expo-constants/build/Constants.js: @unimodules/core could not be found within the project or in these directories:
node_modules/@bugsnag/expo/node_modules/expo-constants/node_modules
node_modules/@bugsnag/expo/node_modules
node_modules

If you are sure the module exists, try these steps:

  1. Clear watchman watches: watchman watch-del-all
  2. Delete node_modules and run yarn install
  3. Reset Metro's cache: yarn start --reset-cache
  4. Remove the cache: rm -rf /tmp/metro-*

1 | import { CodedError, NativeModulesProxy } from '@unimodules/core';
| ^
2 | import { Platform, NativeModules } from 'react-native';
3 | import { AppOwnership, ExecutionEnvironment, UserInterfaceIdiom, } from './Constants.types';
4 | import ExponentConstants from './ExponentConstants';


@kevinavery
Copy link

Thanks for opening this issue - I'm seeing the same error in Xcode Logs using Expo's EAS build system.

@dpolivy
Copy link

dpolivy commented Nov 4, 2021

I am also having Expo SDK 43 build errors with Bugsnag due to a dependency on an old version of expo-crypto:

Couldn't install: EXCrypto » UMCore. Ensure the CocoaPod "UMCore" is installed in your project, then run `npx pod-install` to try again.

Issue stems from this:

"expo-crypto": "~9.2.0",

EDIT: Looks like there are some PRs in progress to address these issues, hopefully one will be merged soon:
#1556 and #1566

@yousif-bugsnag
Copy link
Contributor

Hi @koch-aivy, as noted above we're currently working on Expo 43 support under #1556. This should be available in the next release.

@yousif-bugsnag yousif-bugsnag added backlog We hope to fix this feature/bug in the future bug Confirmed bug labels Nov 4, 2021
@luke-belton
Copy link
Member

Hi @koch-aivy - the fix for this was released in v7.13.3 🎉

@luke-belton luke-belton added released This feature/bug fix has been released and removed bug Confirmed bug backlog We hope to fix this feature/bug in the future labels Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This feature/bug fix has been released
Projects
None yet
Development

No branches or pull requests

5 participants