Closed mzyil closed 1 year ago
manually running npm install joi@17.7.1
at our own package solved the issue for now. thankfully our direct dependency listed this package as ^17.4.0
Make sure that @hapi/hoek@11.0.2
is installed and that you are not overriding its version.
I can verify that the installed version of @hapi/hoek
is indeed 11.0.2
but I still get the error. I should mention that the error comes up only when running the unit tests through jest. I also tried these and they worked:
it's possible this is because of my jest configuration. closing this for now since the node runtime works, for some reason.
I have same problem.
I have the same issue as @mzyil. When I require(@hapi/require/assert)
using node REPL. It works but when being used through jest it fails!
I have the same problem using nuxt 3 in production mode
我在生产模式下使用 nuxt 3 时遇到了同样的问题
Have you resolved this issue? I'm encountering the same problem with Nuxt 3.7.4, Joi 17.11.0, and Node.js 18.15.0.
Is this forever mystery?
我在生产模式下使用 nuxt 3 时遇到了同样的问题
Have you resolved this issue? I'm encountering the same problem with Nuxt 3.7.4, Joi 17.11.0, and Node.js 18.15.0.
yes, this way, when using nuxt https://github.com/nuxt/nuxt/discussions/23065
Is this forever mystery?
If you use Nuxt check this https://github.com/nuxt/nuxt/discussions/23065
Support plan
Context
node-jq
libWhat are you trying to achieve or the steps to reproduce?
Here is the comment that points to the exact line: https://github.com/hapijs/joi/pull/2909/files#r1111330145
What was the result you got?
Cannot find module '@hapi/hoek/assert' from '../../node_modules/joi/lib/index.js'
What result did you expect?
no import errors