hapijs / hoek

Node utilities shared among the extended hapi universe
Other
481 stars 171 forks source link

Cannot find module '@hapi/hoek/assert' #388

Closed andreynovikov95 closed 1 year ago

andreynovikov95 commented 1 year ago

Context

What are you trying to achieve or the steps to reproduce?

I'm trying to run previously written tests with the same functionality with hapi v21.3.0. Nothing is used from the checklist https://github.com/hapijs/hapi/issues/4386. Perhaps there is a problem in dependencies: types/hapi__h2o2 v10.0.1" > joi v17.7.0 > hapi/topo > v5.0.0 > hapi/hoek v10.0.0

What was the result you got?

Cannot find module '@hapi/hoek/assert' from 'node_modules/@hapi/validate/lib/index.js'

Require stack:
  node_modules/@hapi/validate/lib/index.js
  node_modules/@hapi/h2o2/lib/index.js

What result did you expect?

pass tests

wspringer commented 1 year ago

I have exactly the same issue

hidalgofdz commented 1 year ago

I had exactly the same issue with jest. I solved by updating jest to 28. Seems like old jest versions didn't know how to parse the exports attribute from package.json

https://github.com/facebook/jest/releases/tag/v28.0.0

andreynovikov95 commented 1 year ago

I had exactly the same issue with jest. I solved by updating jest to 28. Seems like old jest versions didn't know how to parse the exports attribute from package.json

https://github.com/facebook/jest/releases/tag/v28.0.0

This solved the problem. Thanks