next-swagger-doc: Error after upgrading to next@12.0.0

Hey!

Really love this project, you can see it in production here for the habit tracking web app I’ve been working on in my off time!

You can see my code for the documentation page generation here

Currently I’m starting to look at upgrading my application to next@12.0.0 and I noticed that when I go to documentation page after upgrading versions I get the following error

./node_modules/swagger-ui-react/swagger-ui.js:2:305499
Module not found: Can't resolve 'isarray'

Import trace for requested module:
./node_modules/swagger-ui-react/index.js
./pages/documentation.tsx

https://nextjs.org/docs/messages/module-not-found

This reads like a problem in swagger-ui-react so not sure if there’s anything to do here but I figured I’d open up this issue to start getting the ball rolling on next@12 support!

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@jellydn I’m pretty sure it’s not actually a problem with your library, I think it’s an issue with either next@12 or swagger-ui-react

I removed the dependency on next-swagger-doc and can recreate the same problem (repro’s must be viewed using chrome)

next@11.1.2 + swagger-ui-react@3.52.5 => WORKING

next@12.0.1 + swagger-ui-react@3.52.5 => BROKEN

I’ll go ahead and open up an issue with next in a minute

@trentprynn FYI

node -v
v14.17.0
yarn -v
1.22.15