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 #1139

Closed
2 tasks done
tsjensen opened this issue Mar 30, 2020 · 2 comments
Closed
2 tasks done

Critical dependency: the request of a dependency is an expression #1139

tsjensen opened this issue Mar 30, 2020 · 2 comments

Comments

@tsjensen
Copy link

Versions

  • Node.js version: v12.16.1
  • OS & version: Windows 10 (64bit)
  • Webpack version: 4.42.1
  • got version: 10.7.0

Actual behavior

When using got with Webpack, the Webpack process outputs the following WARNING:

WARNING in ./node_modules/keyv/src/index.js 18:14-40
Critical dependency: the request of a dependency is an expression
 @ ./node_modules/cacheable-lookup/index.js
 @ ./node_modules/got/dist/source/normalize-arguments.js
 @ ./node_modules/got/dist/source/create.js
 @ ./node_modules/got/dist/source/index.js
 @ ./src/foo.js

Expected behavior

The expected behavior is not to see warnings in a Webpack run (unless I caused them).

Code to reproduce

To reproduce:

The source code of the project is simply the code snippet from the got readme, and got is the only production dependency in the demo project.

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.

Thanks for looking into this! If there is anything I can do on my side to work around the problem, or to help you fix it for good, please advise.

@sindresorhus
Copy link
Owner

The warning is caused by keyv. You should open an issue there instead.

@tsjensen
Copy link
Author

Ok - sorry for not noticing this. 😇

Someone else already did: jaredwray/keyv#45
The recommendation was to "close your eyes when the warning appears".

Will have to drop the components then. 😢

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

2 participants