swagger-ui
swagger-ui copied to clipboard
Angular 19 build error with immutable package and SwaggerUI
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:
- With angular 19 and swaggerUI 5.18.2 installed, try to display a swagger doc
- 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
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)```
For anyone else stumbling upon this bug - installing the package [email protected] explicitly fixed the issue for me for now.
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!
That worked for me too! Thanks!