node.jsswagger

Uncaught ReferenceError: SwaggerUIBundle is not defined


I have a NodeJS app with swagger 2.0. I am deploying an image of a repo on my server and I am getting the following error:

Ha fallado la carga del <script> con origen "https://myserver/api-docs/swagger-ui-bundle.js". api-docs:70:38
El objeto Components está desaprobado. Pronto será eliminado.
Uncaught ReferenceError: SwaggerUIBundle is not defined
    onload https://myserver/api-docs/swagger-ui-init.js:373
    EventHandlerNonNull* https://myserver/api-docs/swagger-ui-init.js:2

When I deploy it on local there is no problem, but it looks like it is not accessing to the files, any hint? CORS are '*', it just keeps loading the page until the error happens... so maybe is it something about static files? anyone knows what is all about?

P.S: It does not work, issue: https://github.com/scottie1984/swagger-ui-express/issues/237


Solution

  • It does not work there is an old issue: https://github.com/scottie1984/swagger-ui-express/issues/237