Giter Site home page Giter Site logo

Comments (16)

jellydn avatar jellydn commented on July 4, 2024 1

@trentprynn FYI

node -v
v14.17.0
yarn -v
1.22.15

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024 1

@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)

[email protected] + [email protected] => WORKING

[email protected] + [email protected] => BROKEN

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

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024 1

Close with https://github.com/jellydn/next-swagger-doc/releases/tag/v0.1.11

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

Thanks @trentprynn I will look into this tonight.

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

Hi @trentprynn
I will close this issue as it's not related to the next-swagger-doc package.

Here is my testing with next@12. Thanks.
image

mkdir test
npx degit jellydn/next-swagger-doc/example
yarn && yarn build && yarn start

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024

@jellydn thanks for looking into this and upgrading the sample project to next12! The issue definitely seem like something on my side. Can I ask what node version you're using?

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024

@jellydn I believe this is actually is an issue, please take a look at the following stackblitz reproductions (they must be opened using chrome) and observe that when using next@12 + next-swagger-doc it has the 'isarray' import error I originally mentioned

[email protected] + [email protected] => WORKING

[email protected] + [email protected] => BROKEN

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024

also it seems like all your vercel builds are failing for your demo site deployments to vercel after your upgrade to next@12 and I would bet it's because of the same problem

Screen Shot 2021-10-30 at 8 42 05 AM

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

Thanks @trentprynn

Quite weird as it's working when I tested with example app.

mkdir test
npx degit jellydn/next-swagger-doc/example
yarn && yarn build && yarn start

You're correct. I saw the same error on Vercel build. Let me take a look.

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

FYI

[4/4] Building fresh packages...
--
10:58:22.314 | Done in 34.95s.
10:58:22.339 | Detected Next.js version: 12.0.1
10:58:22.341 | Running "yarn run build"
10:58:22.684 | yarn run v1.22.17
10:58:22.744 | $ next build
10:58:23.588 | info - Checking validity of types...
10:58:28.020 | info - Creating an optimized production build...
10:58:52.447 | Failed to compile.
10:58:52.448 | ./node_modules/swagger-ui-react/swagger-ui.js
10:58:52.449 | Module not found: Can't resolve 'isarray' in '/vercel/path0/example/node_modules/swagger-ui-react'
10:58:52.449 | Import trace for requested module:
10:58:52.449 | ./node_modules/swagger-ui-react/index.j

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

Great. Thanks.

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024

@jellydn I went ahead and opened this issue vercel/next.js#30669

you might want to re-open this issue so users are not confused by this error if they try to use this library (which ends up using swagger-ui-react) and next@>=12

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024

Also, as a temporary fix, if you manually add isarray to your project's dependencies the error does not occur

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

Agreed. Thanks.

from next-swagger-doc.

trentprynn avatar trentprynn commented on July 4, 2024

@jellydn I just tested and this is still an issue, do you think you could make isarray a next-swagger-doc dependency so end users don't have to add to add the dependency to their project?

from next-swagger-doc.

jellydn avatar jellydn commented on July 4, 2024

Ok, no problem. Thanks. I will do this today.

from next-swagger-doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.