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

[Expo web] Critical dependency: require function is used in a way in which dependencies cannot be statically extracted #52

Open
admehta01 opened this issue Mar 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@admehta01
Copy link

admehta01 commented Mar 29, 2022

General

What bug do you experience? 🐞

When using with Expo web, I get a build error.

How can it be reproduced? 🤔

Create a new Expo project, and use the example here.

What behavior is expected? 💡

No build errors


Extras

Screenshots or videos 📸

If applicable, add screenshots or videos to help explain your problem.

Code snippets 📝

Stack trace

./node_modules/react-native/Libraries/Performance/Systrace.js:216:3
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
  214 |   // with numeric IDs
  215 |   // TODO(davidaurelio) Scan polyfills for dependencies, too (t9759686)
> 216 |   (require: $FlowFixMe).Systrace = Systrace;
      |   ^
  217 | }
  218 |
  219 | module.exports = Systrace;

Environment info

Please specify the react, react-native, react-native-chat-ui versions.

react: 17.0.1
react-native: 0.64.3
react-native-chat-ui: 1.4.3

npx react-native info output 👇

System:
    OS: Windows 10 10.0.19043
    CPU: (8) x64 Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
    Memory: 2.84 GB / 15.90 GB
  Binaries:
    Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 7.16.0 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK: Not Found
    Windows SDK: Not Found
  IDEs:
    Android Studio: Not Found
    Visual Studio: Not Found
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.1 => 17.0.1
    react-native: 0.64.3 => 0.64.3
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Platform

Device (e.g. Android emulator, iOS simulator, Samsung Galaxy S21): Chrome (web)

OS version (e.g. iOS 14.5, Android 11): Windows 10


Additional context

Error goes away if I remove so feels like the Chat component is causing this.

Works fine w/ Android emulator.

@admehta01 admehta01 added the bug Something isn't working label Mar 29, 2022
@admehta01 admehta01 changed the title Critical dependency: require function is used in a way in which dependencies cannot be statically extracted [Expo web] Critical dependency: require function is used in a way in which dependencies cannot be statically extracted Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant