-
Notifications
You must be signed in to change notification settings - Fork 9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StandalonePreset isn't exported in 4.14.0 #8163
Closed
sohail-ikigai opened this issue
Aug 26, 2022
· 3 comments
· Fixed by #8906 or TheJ-Erk400/swagger-nest.js#2 · May be fixed by mkajitansnyk/gravitee-gateway#2623, mkajitansnyk/gravitee-gateway#2627 or mkajitansnyk/gravitee-gateway#2631
Closed
StandalonePreset isn't exported in 4.14.0 #8163
sohail-ikigai opened this issue
Aug 26, 2022
· 3 comments
· Fixed by #8906 or TheJ-Erk400/swagger-nest.js#2 · May be fixed by mkajitansnyk/gravitee-gateway#2623, mkajitansnyk/gravitee-gateway#2627 or mkajitansnyk/gravitee-gateway#2631
Labels
Comments
Having the same issue |
Thanks @sohail-ikigai for you solution! |
Resolved by community PR: #8906 |
This was referenced May 21, 2024
This was referenced May 29, 2024
This was referenced Jun 5, 2024
This was referenced Jun 14, 2024
This was referenced Jul 30, 2024
This was referenced Aug 7, 2024
This was referenced Aug 17, 2024
This was referenced Aug 24, 2024
This was referenced Sep 6, 2024
This was referenced Sep 23, 2024
This was referenced Oct 1, 2024
This was referenced Nov 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Q&A (please complete the following information)
Content & configuration
React application bootstrapped using CRA with
react
17.0.2 andreact-dom
17.0.2.App.tsx looks like
Describe the bug you're encountering
Unable to import and use standalone preset, getting
Uncaught Error: Cannot find module 'swagger-ui/dist/swagger-ui-standalone-preset'
swagger-ui-dist
can't be used since it's mean't for server side usage and using nodejs modules likepath
which aren't supported out of the box by webpack 5 and CRA.To reproduce...
Steps to reproduce the behavior:
Expected behavior
We should be able to import and use the
StandaloneLayoutPreset
. Further, types seem to be incorrect forplugins
,presets
andimport SwaggerUIStandalonePreset from 'swagger-ui/dist/swagger-ui-standalone-preset'
Additional context or thoughts
I have a work around by using
patch-package
to patch theswagger-ui/package.json
file to export"./dist/swagger-ui-standalone-preset": "./dist/swagger-ui-standalone-preset.js"
. The patch file looks like:// docs/patches/swagger-ui+4.14.0.patch
The text was updated successfully, but these errors were encountered: