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: the request of a dependency is an expression #1031

Closed
zorro-ftw opened this issue Apr 19, 2024 · 1 comment
Closed

Comments

@zorro-ftw
Copy link

I started using public-ip package in my Next.js frontend project and saw the following warning appearing. As indicated in the warning, the dependency chain brought me to this package.

⚠ ./node_modules/keyv/src/index.js
Critical dependency: the request of a dependency is an expression

Import trace for requested module:
./node_modules/keyv/src/index.js
./node_modules/cacheable-request/dist/index.js
./node_modules/got/dist/source/core/index.js
./node_modules/got/dist/source/index.js
./node_modules/public-ip/index.js

The problem seems to occur because of the following line in keyv / packages / keyv / src / index.ts :

return new (require(adapters[adapter]))(options);

At this moment, I don't have any solution proposals. However, I will try and test possible solutions further and in the meantime this issue might clear some other confused people like me.

@zorro-ftw
Copy link
Author

I just realized a former issue that's been replied by the owner (#976) stating that this will be fixed in upcoming v5. Closing this issue because of that.

I suggest anyone ending up here to take a look at this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant