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

@nest/swagger example does not work in my wsl2 #861

Closed
yjl9903 opened this issue Jul 22, 2020 · 8 comments
Closed

@nest/swagger example does not work in my wsl2 #861

yjl9903 opened this issue Jul 22, 2020 · 8 comments

Comments

@yjl9903
Copy link

yjl9903 commented Jul 22, 2020

I'm submitting a...


[ ] Regression 
[x] Bug report
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.

Current behavior

I tried the official working example in my wsl2. After I started the nest app and go to http://localhost:3000/api/, I clicked any route in cats tag, then the page flashed and this route went to default tag, and the current url is http://localhost:3000/api/#/default/post_cats. Then, I clicked this route, it will keep loadding like the flowing picture.

image

The nest log is:

yarn run v1.22.4
$ nest start
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [NestFactory] Starting Nest application...
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [InstanceLoader] AppModule dependencies initialized +10ms
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [InstanceLoader] CatsModule dependencies initialized +0ms
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [RoutesResolver] CatsController {/cats}: +39ms
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [RouterExplorer] Mapped {/cats, POST} route +2ms
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [RouterExplorer] Mapped {/cats/:id, GET} route +1ms
[Nest] 17403   - 07/22/2020, 3:16:25 PM   [NestApplication] Nest application successfully started +1ms
Application is running on: http://[::1]:3000

There is not log in the browser.

Expected behavior

I want to see the detailed route infomation.

Minimal reproduction of the problem with instructions

Official working example.

Environment


Nest version: 7.3.2

 
For Tooling issues:
- Node version: 14.5.0  
- Platform:  Windows Subsystem for Linux 2, Ubuntu-20.04, Linux 4.19.104-microsoft-standard,  Windows10 2004 

Others:

@chaims
Copy link

chaims commented Jul 22, 2020

I have the same problem

@chaims
Copy link

chaims commented Jul 22, 2020

change [swagger-ui-dist version "3.30.1"] to [version "3.26.2"] can resolve this problem

@julien-sugg
Copy link

This issue is indeed related to the swagger-ui-dist. Please note that an issue is already raised on their bug tracker.

As a workaround you can leverage yarn resolutions and add the following to your package.json as stated here

...
  "resolutions": {
    "swagger-ui-dist": "3.30.0"
  }
...

@yjl9903
Copy link
Author

yjl9903 commented Jul 22, 2020

Thanks to @julien-sugg @chaims .

I will pay attention to this bug tracker.

@kamilmysliwiec
Copy link
Member

This should be fixed in the [email protected] swagger-api/swagger-ui#6249

@bilal-tekhqs
Copy link

Hi I have encountered a wired issue something like this but different in such a way that, I am sharing schemas as $ref in multiple endpoints. the issue is when I pass the schema as $ref in one endpoints example it shows up fine n swagger but when I pass the same schema in the second endpoints example it throughs error as follows:
image

the working example is:
localhost_1349_api_swagger_ (1)
kindly help me here
this is my one endpoint
image
& this is the other endpoint.both located in one file
image
any help would be appreciated thanks

@bilal-tekhqs
Copy link

@kamilmysliwiec kindly respond

@kamilmysliwiec
Copy link
Member

Please, use our Discord channel (support) for such questions. We are using GitHub to track bugs, feature requests, and potential improvements.

@nestjs nestjs locked and limited conversation to collaborators Aug 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants