swagger-api / swagger-api/swagger-ui
getting error while Compiling in Angular Typescript
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: [Windows 11]
- Browser: [chrome]
- Version: [112.0.5615.138]
- Method of installation: [npm,]
- Swagger-UI version: [^3.31.0]
- Swagger/OpenAPI version: [Swagger 2.0, OpenAPI 3.0]
Content & configuration
Swagger/OpenAPI definition:
# your YAML here
Swagger-UI configuration options:
SwaggerUIBundle({
urls: [
{
name: "Test",
url: "https://petstore.swagger.io/v2/swagger.json",
},
],
domNode: this.swaggerDom.nativeElement,
deepLinking: true,
presets: [SwaggerUIBundle.presets.apis, SwaggerUIStandalonePreset],
layout: "StandaloneLayout",
});
?yourQueryStringConfig
Screenshots

How can we help?
Angular V9.0, "swagger-ui-dist": "^3.31.0", while compiling i am getting "ERROR in ./node_modules/swagger-ui-dist/absolute-path.js
Module not found: Error: Can't resolve 'path' in 'D:\Workspace\DIS\Integration Branch\dis-ui\node_modules\swagger-ui-dist'"
angular.json style path is "./node_modules/swagger-ui-dist/swagger-ui.css"
can any one please help me to fix this issue
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Angular compilation using the configuration in the issue and inspect node_modules/swagger-ui-dist/absolute-path.js, where the unresolved path module is reported. Compare the build behavior with the angular.json stylesheet entry and confirm that the project compiles successfully without the Module not found error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100