Skip to content

Getting TypeError: s is not a functionafter upgrading to v5.11.0 #10511

@PenghaiZhang

Description

@PenghaiZhang

Q&A (please complete the following information)

  • OS: Ubuntu 22
  • Browser: Chrome
  • Version: 135.0.7049.114
  • Method of installation: [e.g. npm, dist assets]
  • Swagger-UI version: 5.11.0
  • Swagger/OpenAPI version: N/A

Content & configuration

Swagger-UI configuration options:

SwaggerUI({
  dom_id: "#swagger-ui",
  url: $("base").attr("href") + "api/swagger.yaml",
});

Describe the bug you're encountering

We are trying to upgrade swagger-ui from v4 to v5. It was OK when we upgraded to v5.10.5. But since v5.11.0, there is a type error occurring when we access the page.

It appears the error could be related to React, but our project is a pretty small one which does not use React in any way. We simply use webpack to generate a JS bundle file to be consumed in some html pages.

This is our webpack config.
Image

This is the package.json file.

Image

This is how we use the js bundle file.

Image

To reproduce...

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

The page should be correctly displayed.

Screenshots

With 5.11.0:
Image

With 5.10.5:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions