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

UnknownElementException error with Nest v8 #35

Closed
tahubu opened this issue Aug 2, 2021 · 0 comments · Fixed by #36
Closed

UnknownElementException error with Nest v8 #35

tahubu opened this issue Aug 2, 2021 · 0 comments · Fixed by #36
Labels
bug Something isn't working

Comments

@tahubu
Copy link
Collaborator

tahubu commented Aug 2, 2021

During Nest application bootstrap, I get this error:

UnknownElementException [Error]: Nest could not find MyListener element (this provider does not exist in the current context)
  at InstanceLinksHost.get (/Users/tahubu/my-project/node_modules/@nestjs/core/injector/instance-links-host.js:16:19)
  at Object.find (/Users/tahubu/my-project/node_modules/@nestjs/core/injector/module-ref.js:38:55)
  at Object.get (/Users/tahubu/my-project/node_modules/@nestjs/core/injector/module.js:344:28)
  at QueueModule.attachListeners (/Users/tahubu/my-project/node_modules/@team-supercharge/nest-amqp/queue.module.js:126:43)
  at QueueModule.onModuleInit (/Users/tahubu/my-project/node_modules/@team-supercharge/nest-amqp/queue.module.js:103:20)
  at Object.callModuleInitHook (/Users/tahubu/my-project/node_modules/@nestjs/core/hooks/on-module-init.hook.js:51:35)
  at processTicksAndRejections (node:internal/process/task_queues:96:5)
  at NestApplication.callInitHook (/Users/tahubu/my-project/node_modules/@nestjs/core/nest-application-context.js:169:13)
  at NestApplication.init (/Users/tahubu/my-project/node_modules/@nestjs/core/nest-application.js:97:9)
  at NestApplication.listen (/Users/tahubu/my-project/node_modules/@nestjs/core/nest-application.js:156:33)

From version 8, Nest uses class reference instead of class constructor name as injection token, but @team-supercharge/nest-amqp library supports only class constructor names.
Here is the commit about the modification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant