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

Critical dependency: require function is used in a way in which dependencies cannot be statically extracted #441

Open
2 tasks done
pratikgl opened this issue Apr 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@pratikgl
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

The react app compiles with a warning, because of which I am unable to deploy it to production.

Expected behavior 🤔

No response

Steps to reproduce 🕹

Steps:

  1. import components from "@giphy/react-components";
  2. During compilation, it would throw warnings saying
./node_modules/@giphy/js-fetch-api/dist/index.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

./node_modules/@giphy/js-fetch-api/dist/index.js
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Screenshots or Videos 📹

No response

Platform 🌍

  • OS : [MacOS]
  • Browser : [Chrome]
  • Version : "@giphy/react-components": "^9.3.0"

GIPHY-JS SDK version

"@giphy/react-components": "^9.3.0"

TypeScript version

No response

Additional context 🔦

Note:
I am using Craco.

@pratikgl pratikgl added the bug Something isn't working label Apr 17, 2024
@yangchristina
Copy link

Also getting this, using Next.js 14.2.3
"@giphy/js-fetch-api": "^5.6.0",
"@giphy/react-components": "^9.5.0",

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

2 participants