Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for PnP, fix deps #7722

Closed
simPod opened this issue Dec 28, 2021 · 3 comments
Closed

Add support for PnP, fix deps #7722

simPod opened this issue Dec 28, 2021 · 3 comments

Comments

@simPod
Copy link
Contributor

simPod commented Dec 28, 2021

Is your feature request related to a problem?

I'm using Yarn PnP and swagger ui seems not to support it as it complains about missing dependencies, e.g.

Module not found: Error: Can't resolve 'cookie' in '/path/.yarn/virtual/swagger-ui-react-virtual-559452a1d4/0/cache/swagger-ui-react-npm-4.1.3-89d3cb5de1-dd02f1193d.zip/node_modules/swagger-ui-react'

I've stumbled upon #7556 where other people already mentioned the same problem with

autolinker
btoa
cookie
fast-json-patch
formdata-node
isarray
qs
regenerator-runtime
traverse

Describe the solution you'd like

Support Yarn PnP, fix project deps.

Describe alternatives you've considered

The suggested solution in the linked issue was to use old node_modules way but that's not a solution but workaround and no because it burns my laptop alive.

image

@JeremyKennedy
Copy link

Six months since I last looked into this. Today, I was hoping to switch my project to PnP. Swagger is the only blocker. I'm sad to see this still isn't fixed. To get it working, I have to use swagger-ui-react@4.1.3 - 4.2.1 breaks it, and future versions (4.12.0) don't fix it. I also have to yarn add the dependencies mentioned above. Super lame.

I've given up on swagger-ui-react after finding a workaround that works for me, using UNPKG rather than including the dependency in my project: https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/installation.md#unpkg

It works well and means I don't need any of the swagger deps in my project anymore. I just include a static html file and I can pass my configs just like I did with the regular package.

@simPod
Copy link
Contributor Author

simPod commented Sep 29, 2023

Now only Module not found: Error: Can't resolve 'repeat-string' is to be fixed. The rest is resolved.

@simPod
Copy link
Contributor Author

simPod commented May 13, 2024

This seems to no longer be the case.

@simPod simPod closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants