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

Bug #396

Closed
jesse996 opened this issue Apr 5, 2021 · 3 comments
Closed

Bug #396

jesse996 opened this issue Apr 5, 2021 · 3 comments

Comments

@jesse996
Copy link

jesse996 commented Apr 5, 2021

[Nest] 8052 - 2021/04/05下午5:40:29 [ExceptionHandler] Nest can't resolve dependencies of the DouyuService (?). Please make sure that the argument DefaultPuppeteerPage at index [0] is available in the AppModule context.

Potential solutions:

  • If DefaultPuppeteerPage is a provider, is it part of the current AppModule?
  • If DefaultPuppeteerPage is exported from a separate @module, is that module imported within AppModule?
    @module({
    imports: [ /* the Module containing DefaultPuppeteerPage */ ]
    })
    +1ms
    Error: Nest can't resolve dependencies of the DouyuService (?). Please make sure that the argument DefaultPuppeteerPage at index [0] is available in the AppModule context.
@jesse996
Copy link
Author

jesse996 commented Apr 5, 2021

import { PuppeteerModule } from 'nest-puppeteer';

@Module({
  imports: [PuppeteerModule.forFeature()],
  controllers: [AppController, DouyuController],
  providers: [AppService, DouyuService, PuppeteerService],
})
export class AppModule {}

@Injectable()
export class DouyuService {
  constructor(@InjectPage() private readonly page: Page) {}
}

I dont know why it not wroking

@tinovyatkin
Copy link
Owner

Do you have PuppeteerModule.forRoot somewhere?

@jesse996
Copy link
Author

jesse996 commented Apr 5, 2021

Do you have PuppeteerModule.forRoot somewhere?

I try PuppeteerModule.forRoot and PuppeteerModule.forFeature() ,same with README.md,but all not work

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