Open Poolshark opened 2 years ago
I also get a similar error when bundling with webpack. I am using webpack with swc
webpack version - 5.75 node - 18.12.1
Error:
WARNING in ./node_modules/import-fresh/index.js 32:31-48 Critical dependency: the request of a dependency is an expression
For me this error is coming through packages following packages:
+1
Import trace for requested module:
./node_modules/import-fresh/index.js
./node_modules/cosmiconfig/dist/loaders.js
./node_modules/cosmiconfig/dist/index.js
./node_modules/@databases/pg-config/lib/index.js
./node_modules/@databases/pg/lib/index.js
./src/lib/database.tsx
./src/app/page.tsx
⚠ ./node_modules/cosmiconfig/dist/loaders.js
Critical dependency: the request of a dependency is an expression
I've ran into an issue when trying to run a React application with Webpack 5. I receive the warning
According to here this is caused by something like:
Here is the location in your source code which could be the problem.