-
Notifications
You must be signed in to change notification settings - Fork 227
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
Uncaught ReferenceError: SwaggerUIBundle is not defined at window.onload with SwaggerUI on typescript #339
Comments
I'm facing the same issue. I think this has something to do with the configurations. Because the issue doesn't appear for me in local and one of the environment , but only in my production env where certain things like load balancer etc are implemented. |
Seems this issue exists when using webpack to configure the project. I tried in a different express app built from scratch and it was working fine. |
@ag2byte I doubt it has something to do with webpack. Cz for me, app is configured with webpack across all my environments., but I face this issue only in my prod env where these load balancer and stuffs are present |
webpack need external swagger module,and you need keep path in webpack.config.js
|
Tried your solution but still throws an error for me, I even tried to load the |
This fixed it for me: https://stackoverflow.com/a/63048697/830403 |
@svinci121 you find a solution? |
I have an express project that is also returning these errors in the console, but only in production, locally it works correctly |
I faced the same problem while trying to build the code with esbuild and could solve it by adding Here is the complete build command of my project: esbuild src/index.ts --bundle --platform=node --outfile=dist/index.js --external:express --external:cors --external:swagger-ui-express
|
have you solved this problem |
I am trying to create documentation using
swagger-ui-express
andswagger-jsdoc
as follows:While running I get the following issue on console:
Is this issue related to any missing dependency or is this a bug?
The text was updated successfully, but these errors were encountered: