is this issue currently blocking your project? yes:
is this issue affecting a production system? (yes/no):
Context
node version: 16.20.2
module version: @hapi/hapi 21.3.2
environment (e.g. node, browser, native): ndoe
used with (e.g. hapi application, another framework, standalone, ...): hapi application
any other relevant information: @hapi/catbox-memory : 6.0.1
How can we help?
I've been asked to upgrade our hapi server from version 11 to the latest version (21.3.2), which requires quite a bit of refactoring. I've managed to get the server running, and everything seems to be working properly, but I get an error when I try to add a cache system and I can't figure out if the problem is with my implementation or not.
Here is the error I get when I start the server :
TypeError: refAnnotations.errors[cacheKey].push is not a function
at exports.ValidationError.exports.error [as annotate] (...path/server/node_modules/@hapi/validate/lib/annotate.js:53:53)
This is how my server is initialised and how the cache system is implemented :
Support plan
Context
How can we help?
I've been asked to upgrade our hapi server from version 11 to the latest version (21.3.2), which requires quite a bit of refactoring. I've managed to get the server running, and everything seems to be working properly, but I get an error when I try to add a cache system and I can't figure out if the problem is with my implementation or not.
Here is the error I get when I start the server :
This is how my server is initialised and how the cache system is implemented :
I've tried several different syntaxes but the hapi documentation doesn't help me much, I can't see what I'm missing.
Thank you :)