Surnet / swagger-jsdoc

Generates swagger/openapi specification based on jsDoc comments and YAML files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Critical dependency: the request of a dependency is an expression

DavidJakszta opened this issue · 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

Screenshots
image

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

Exactly the same issue here. What @xHayden suggested works for me. But editing swagger-jsdoc in the node_modules directory is not a solution.