Open martin-badin opened 9 months ago
I got my NextJS project working, while it is version 14.0.4 instead of 13, I see some mistakes that could cause errors in your setup.
const SwaggerUI = dynamic(import('swagger-ui-react'), {ssr: false});
should be
const SwaggerUI = dynamic(() => import('swagger-ui-react'), {ssr: false});
in order for it to be dynamically imported. This is also the method used in the following documentation.
You are also mixing between GetStaticProps & GetServerSideProps types. I think this would need to be consistent, but I am unsure if it makes a difference in this case.
Hope this helps :)
your answer helped me @MakakWasTaken , thank you
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition: It does not depend on the API definition
Swagger-UI configuration options:
Describe the bug you're encountering
I see in the terminal
Static worker unexpectedly exited with code: 1 and signal: null
once withgetServerSideProps
method and 4-times withgetStaticProps
method. I can build Nextjs project just withgetServerSideProps
. Sorry, but I don't know how to better describe this issue.