{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4971","repository_url":"https://api.github.com/repos/swagger-api/swagger-ui","labels_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4971/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4971/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4971/events","html_url":"https://github.com/swagger-api/swagger-ui/issues/4971","id":374002815,"node_id":"MDU6SXNzdWUzNzQwMDI4MTU=","number":4971,"title":"swagger-ui npm module doesn't compile with Angular 7","user":{"login":"KutsenkoA","id":5176060,"node_id":"MDQ6VXNlcjUxNzYwNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/5176060?v=4","gravatar_id":"","url":"https://api.github.com/users/KutsenkoA","html_url":"https://github.com/KutsenkoA","followers_url":"https://api.github.com/users/KutsenkoA/followers","following_url":"https://api.github.com/users/KutsenkoA/following{/other_user}","gists_url":"https://api.github.com/users/KutsenkoA/gists{/gist_id}","starred_url":"https://api.github.com/users/KutsenkoA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KutsenkoA/subscriptions","organizations_url":"https://api.github.com/users/KutsenkoA/orgs","repos_url":"https://api.github.com/users/KutsenkoA/repos","events_url":"https://api.github.com/users/KutsenkoA/events{/privacy}","received_events_url":"https://api.github.com/users/KutsenkoA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-25T15:22:16Z","updated_at":"2018-10-30T08:52:57Z","closed_at":null,"author_association":"NONE","body":"### Q&A (please complete the following information)\r\n - OS: Windows 10\r\n - Browser: n/a\r\n - Version: n/a\r\n - Method of installation: npm\r\n - Swagger-UI version: 3.19.4\r\n - Swagger/OpenAPI version: n/a\r\n - Angular version: 7.0.1 \r\n\r\n### Describe the bug you're encountering\r\n\r\nAngular application compiles with an error:\r\n```\r\nDate: 2018-10-25T15:05:14.379Z\r\nHash: f05c6339336aa563f08a\r\nTime: 11370ms\r\nchunk {main} main.js, main.js.map (main) 12.7 kB [initial] [rendered]\r\n\r\nERROR in ./node_modules/xml/lib/xml.js\r\nchunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 228 kB [initial] [rendered]\r\nchunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]\r\nModule not found: Error: Can't resolve 'stream' in '.\\node_modules\\xml\\lib'\r\nchunk {styles} styles.js, styles.js.map (styles) 17 kB [initial] [rendered]\r\nchunk {vendor} vendor.js, vendor.js.map (vendor) 6.77 MB [initial] [rendered]\r\ni ｢wdm｣: Failed to compile.\r\n```\r\n\r\n\r\n### To reproduce...\r\n\r\nCreate a new Angular project then do `npm install swagger-ui` and add code to the app.component.ts:\r\n```typescript\r\nimport { SwaggerUI } from 'swagger-ui';\r\n\r\n@Component({\r\n  selector: 'app-root',\r\n  templateUrl: './app.component.html',\r\n  styleUrls: ['./app.component.sass']\r\n})\r\nexport class AppComponent implements OnInit {\r\n\r\n  ngOnInit() {\r\n    SwaggerUI({\r\n      dom_id: '#swagger-ui',\r\n      urls: [{\r\n        url: 'any proper url',\r\n        name: 'API name'\r\n      }]\r\n    });\r\n  }\r\n}\r\n```\r\n\r\nthen run `npm start` and you will get an error\r\n\r\n### Expected behavior\r\nCompile an application without any errors\r\n\r\n### Additional context or thoughts\r\nI think `xml` dependency requires `stream` lib, which is a part of node.js core and it's not compiled with Angular.\r\n"},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/comments/434219114","html_url":"https://github.com/swagger-api/swagger-ui/issues/4971#issuecomment-434219114","issue_url":"https://api.github.com/repos/swagger-api/swagger-ui/issues/4971","id":434219114,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDIxOTExNA==","user":{"login":"KutsenkoA","id":5176060,"node_id":"MDQ6VXNlcjUxNzYwNjA=","avatar_url":"https://avatars0.githubusercontent.com/u/5176060?v=4","gravatar_id":"","url":"https://api.github.com/users/KutsenkoA","html_url":"https://github.com/KutsenkoA","followers_url":"https://api.github.com/users/KutsenkoA/followers","following_url":"https://api.github.com/users/KutsenkoA/following{/other_user}","gists_url":"https://api.github.com/users/KutsenkoA/gists{/gist_id}","starred_url":"https://api.github.com/users/KutsenkoA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KutsenkoA/subscriptions","organizations_url":"https://api.github.com/users/KutsenkoA/orgs","repos_url":"https://api.github.com/users/KutsenkoA/repos","events_url":"https://api.github.com/users/KutsenkoA/events{/privacy}","received_events_url":"https://api.github.com/users/KutsenkoA/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T08:52:57Z","updated_at":"2018-10-30T08:52:57Z","author_association":"NONE","body":"> Hey @KutsenkoA, this appears to be an Angular issue - we don't depend on the `xml` module.\r\n\r\nI'm sorry, but you do:\r\nhttps://github.com/swagger-api/swagger-ui/blob/9a9b63634fdbe1de0556818fdb78e211c4e2fa83/package.json#L80\r\n \r\n> Before I close it, though... can you provide an angular project repository that I can use to recreate this bug?\r\n\r\nSure - https://github.com/KutsenkoA/imhotep\r\n\r\n"}}
{"actor":{"display_login":"KutsenkoA"}}