swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Angular 19 build error with immutable package and SwaggerUI

Open TrystanHumann opened this issue 2 years ago • 4 comments

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: 124.0.6367.78
  • Method of installation: npm
  • Swagger-UI version: 5.18.2
  • Swagger/OpenAPI version: Swagger 2.0

Content & configuration

Swagger-UI configuration options:

SwaggerUI({
      domNode: document.getElementById('swagger-ui-item'),
      url: 'https://petstore.swagger.io/v2/swagger.json',
    });

Describe the bug you're encountering

To reproduce...

Steps to reproduce the behavior:

  1. With angular 19 and swaggerUI 5.18.2 installed, try to display a swagger doc
  2. When page loads, it will point you to a map call on immutable which doesn't exist in the swaggerUI version.

Expected behavior

SwaggerUI should not throw an error and display the swagger doc.

Screenshots

Console error printed above

TrystanHumann avatar Nov 24 '24 04:11 TrystanHumann

seeing the same issue with angular 19

ERROR TypeError: Cannot read properties of undefined (reading 'Map')
    at exports.default (combineReducers.js:15:113)
    at allReducers (swagger-ui-es-bundle-core.js:4476:23)
    at buildReducer (swagger-ui-es-bundle-core.js:4477:7)
    at Store.rebuildReducer (swagger-ui-es-bundle-core.js:4478:5)
    at Store.buildSystem (swagger-ui-es-bundle-core.js:4434:221)
    at Store.register (swagger-ui-es-bundle-core.js:4428:45)
    at new Store (swagger-ui-es-bundle-core.js:4421:85)
    at SwaggerUI (swagger-ui-es-bundle-core.js:18086:9)
    at Object.next (component.ts:37:7)
    at ConsumerObserver2.next (Subscriber.js:90:25)```

IsaacBoy avatar Apr 28 '25 13:04 IsaacBoy

For anyone else stumbling upon this bug - installing the package [email protected] explicitly fixed the issue for me for now.

IsaacBoy avatar May 27 '25 12:05 IsaacBoy

For anyone else stumbling upon this bug - installing the package [email protected] explicitly fixed the issue for me for now.

Thanks, fixed for me too!

ArmadOon avatar Jun 12 '25 09:06 ArmadOon

That worked for me too! Thanks!

Sutherlandon avatar Oct 06 '25 22:10 Sutherlandon