question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot run the 'app' in RedocModule.setup();

See original GitHub issue

Hello Redoc, thank you for your awesome work. But i have a bit issue on how to install it.

So, I have already done all the installation and put some code inside my main.ts file exactly the same:

const options = new DocumentBuilder()
  .setTitle('Look, i have a title')
  .setDescription('A very nice description')
  .setBasePath('/api/v1')
  .build();
  const document = SwaggerModule.createDocument(app, options);

  const redocOptions: RedocOptions = {
    title: 'Hello Nest',
    logo: {
      url: 'https://redocly.github.io/redoc/petstore-logo.png',
      backgroundColor: '#F0F0F0',
      altText: 'PetStore logo'
    },
    sortPropsAlphabetically: true,
    hideDownloadButton: false,
    hideHostname: false
  };
  // Instead of using SwaggerModule.setup() you call this module
  await RedocModule.setup('/docs', app, document, redocOptions);

Focused on the line code : await RedocModule.setup('/docs', app, document, redocOptions);

I have an issue on ‘app’ such as:

Argument of type 'import("/Users/kcb/Documents/Projects/Sample/Deploy_zeit/deploy-zeit/node_modules/@nestjs/common/interfaces/nest-application.interface").INestApplication' is not assignable to parameter of type 'import("/Users/kcb/Documents/Projects/Sample/Deploy_zeit/deploy-zeit/node_modules/nestjs-redoc/node_modules/@nestjs/common/interfaces/nest-application.interface").INestApplication'.
  The types returned by 'getHttpAdapter().createMiddlewareFactory(...)' are incompatible between these types.

Perhaps, you guys can help me on this issue. Thanks!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mxarccommented, Nov 5, 2020

@cerireyhan package will be updated real soon, I’ve fixed many issues and added authentication feature (optional)

2reactions
kevinsprolescommented, Oct 30, 2020

Having the same issue. How did you solve @Ketibansapi ?

I’m on nestjs 7.4.4.

When I look in node_modules/nestjs-redoc I see the package.json in there says “@nestjs/common”: “^6.11.5”. Seems you haven’t pushed the latest from github to npm.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot install Drupal with Redis [#2876132]
We were investigating enabling Redis caching for Drupal 8 out of the box on Platform.sh. However, when I tried to install Drupal with...
Read more >
Node Redis does not work on my windows computer even ...
I used node-redis 3.0.0 rather than 4 and the code works fine. ... In version 4.0.1, we have to add .connect() to run...
Read more >
Redis modules API
Normally the module will store the module configuration parameters in some ... Because the API is meant to be very fast, it cannot...
Read more >
Running Redis on Windows 10
In this guide, we will cover several topics that will help you install Redis on Windows, and also address if this is indeed...
Read more >
redis - npm
If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!) use .sendCommand() : await client.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found