nestjs / axios

Axios module for Nest framework (node.js) 🗂

Home Page:https://docs.nestjs.com/techniques/http-module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency issue of HttpService

se-faizankhan opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

By adding HttpModule in imports array gives issue of dependency for httpservice in v 0.0.5 by downgrading to v 0.0.4
the issue was resolved.

"dependencies": {
"@nestjs/axios": "^0.0.5",
"@nestjs/common": "^8.0.0",
"@nestjs/config": "^1.1.6",
"@nestjs/core": "^8.0.0",
"@nestjs/passport": "^8.1.0",
"@nestjs/platform-express": "^8.0.0",
"@nestjs/typeorm": "^8.0.3",
}

ERROR [ExceptionHandler] Nest can't resolve dependencies of the HttpService (?). Please make sure that the argument AXIOS_INSTANCE_TOKEN at index [
0] is available in the AuthModule context.

Potential solutions:

  • If AXIOS_INSTANCE_TOKEN is a provider, is it part of the current AuthModule?
  • If AXIOS_INSTANCE_TOKEN is exported from a separate @module, is that module imported within AuthModule?
    @module({
    imports: [ /* the Module containing AXIOS_INSTANCE_TOKEN */ ]
    })

Minimum reproduction code

https://github.com/nestjs/axios

Steps to reproduce

No response

Expected behavior

Adding httpservice normally as it was happening in v0.0.4

Package version

0.0.5

NestJS version

8.2.0

Node.js version

14.17.0

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

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