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.

v8: CacheModule is not working: Cannot read property 'httpAdapter' of undefined

See original GitHub issue

Bug Report

Current behavior

Importing CacheModule.register() and then using @UseInterceptors(CacheInterceptor) throws an error:

Cannot read property ‘httpAdapter’ of undefined

When downgrading to 7.x it works as expected.

Repo: https://github.com/MickL/nestjs-8-cache-bug

Reproduce:

  1. yarn start
  2. curl localhost:3000

Environment


Nest version: 8.0.0-alpha.4
 
For Tooling issues:
- Node version: v14.17.0
- Platform: macOS Big Sur

Issue Analytics

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

github_iconTop GitHub Comments

2reactions
kamilmysliwieccommented, May 24, 2021

Fixed in 8.0.0-alpha.5. Thanks for reporting!

0reactions
cdoukourecommented, Jul 26, 2021

Hi everyone.

After upgrade to v8 i always get this error even if i uninstall the nestjs/cqrs package

Nest can’t resolve dependencies of the CommandBus (?). Please make sure that the argument ModuleRef at index [0] is available in the CqrsModule context.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read properties of undefined on Nest.js Model ...
I have recently started getting type errors on Nest.js (I think after upgrading to v8) and can't figure them out. This is on...
Read more >
Caching | NestJS - A progressive Node.js framework
If the item does not exist in the cache, null will be returned. ... Thus, CacheModule (which uses interceptors to cache responses) will...
Read more >
NestJS Caching Globally neatly. - DEV Community ‍ ‍
First things first, if you don't know about the NestJS Caching module, It's quite easy to understand, It will let you cache whatever...
Read more >
cannot read properties of undefined (reading 'type') nestjs
I want to create and use schema in nestjs with fastify and mongoose. Tried resolving with relative path but not solving the issue....
Read more >
Viewing online file analysis results for 'my_setup.exe'
Not all malicious and suspicious indicators are displayed. Get your own cloud service or the full version to view all details.
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