critical dependency: the request of a dependency is an expression

Critical dependency: the request of a dependency is an expression

Have a question about this project?

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. The text was updated successfully, but these errors were encountered:. Sorry, something went wrong.

Critical dependency: the request of a dependency is an expression

I am getting three warning messages when importing request in a barebone webpack project. A minimal example to reproduce the bug is available on GitHub run npm install and npm start. Webpack tries to resolve require calls statically to make a minimal bundle. My rationale is that this dynamic import is not desirable in production, and code is best kept warning-free. That means I want any solution that resolves the problem. According to the authors of ajv , the issue will likely be resolved in the latest version of request in a few weeks' time. It's more complicated, but you usually don't need to care what it looks like, so I won't show an example, but it can be good to know that it exists. Skip to content ajv request webpack I am getting three warning messages when importing request in a barebone webpack project. Critical dependency: the request of a dependency is an expression How can I get rid of this warning? More information: Webpack tries to resolve require calls statically to make a minimal bundle. Adding a hack. Upgrading my libraries. However, if I want to use it, I have to wait until it is released, and then until har-validator and request release subsequent updates. If there is a way to force har-validator to use the beta version of ajv , that would solve my problem. Best Solution.

More information: Webpack tries to resolve require calls statically to make a minimal bundle. Why can't a util function be called inside getServerSideProps?!

.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. The text was updated successfully, but these errors were encountered:. Sorry, something went wrong. Is there any chance you could make the example smaller?

Critical dependency: the request of a dependency is an expression

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub?

Amber heard xxx

It works, but it seems to be more a workaround than a solution. Jump to bottom. That means I want any solution that resolves the problem. Upgrading my libraries. Related Question. All reactions. A minimal example to reproduce the bug is available on GitHub run npm install and npm start. Verify canary release I verified that the issue exists in the latest Next. Notifications Fork Star 5. Click on logout button present in navbar and check server logs. Sorry, something went wrong. Skip to content.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub?

However, if I want to use it, I have to wait until it is released, and then until har-validator and request release subsequent updates. Best Solution. Critical dependency error when using API in Next. You switched accounts on another tab or window. LudoLogical mentioned this issue Nov 24, Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Describe the bug When NextJS is compiling pages on the fly, console shows a warning : warn -. Related Question. New issue. Already have an account? The text was updated successfully, but these errors were encountered:. Have a question about this project? Jump to bottom. Ok, so I will search further more, and come back to share what I found! It's inside that function I eventually call serverSideTranslations All reactions.

3 thoughts on “Critical dependency: the request of a dependency is an expression

Leave a Reply

Your email address will not be published. Required fields are marked *