Open jonathan-silva opened 4 years ago
Seeing the same issue, same error trying to import this into a React app (with a Webpack build process)
I was able to work around this by mocking process.version in the browser. Any attempt to import swagger-ui (directly or implicitly through swagger-ui-react) would lead to the error above. Our application mocks the process
object that's present in a Node application, and I was able to work around this error by adding process.version to that mocked object. I got there via this issue: https://github.com/nodejs/readable-stream/issues/313
Q&A (please complete the following information) Browser: n/a Method of installation: npm Swagger-UI version: 3.19.5 Swagger/OpenAPI version: n/a Angular version: 8.2.14
Angular application compiles with an error:
then run npm start and you will get an error
Additional context or thoughts A buffer@5.2.1 dependency was added because it was complaining about another mistake. Added, complained about this error
"Uncaught TypeError: Cannot read property 'slice' of undefined"
Anyone with an idea of the problem would be very grateful for the help.
Thanks