Critical dependency: the request of a dependency is an expression
DavidJakszta opened this issue · 4 comments
Describe the bug
Getting following warning Critical dependency: the request of a dependency is an expression
To Reproduce
Follow the tutorial on https://next-swagger-doc.productsway.com/ about generating swagger docs for Nextjs13:
Usage #1: next-swagger-doc with Next.js 13
Expected behavior
No Warning
Desktop (please complete the following information):
- OS: Windows 10
Additional context
I followed the tutorial on https://next-swagger-doc.productsway.com/ about generating swagger docs for Nextjs13
It's a problem with loadCjs = require(resolvedPath);
in ./node_modules/swagger-jsdoc/src/utils.js
.
I assume it's because webpack can't figure out what resolvedPath is to make a dependency graph.
After removing the Cjs loader from utils.js and clearing my .next cache, the error went away because the loader was never being used, but this is obviously not a final solution.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any progress in this issue? Just had the exact same problem here