Skip to content

Cannot find module '@hapi/hoek/assert' from 'index.js' #2917

@sagarpanda

Description

@sagarpanda

Support plan

  • is this issue currently blocking your project? (yes/no): Yes
  • is this issue affecting a production system? (yes/no): Yes

Context

  • node version: 16.18.1
  • module version with issue: 17.18.1
  • last module version without issue: 17.7.0
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): joi
  • any other relevant information: It seems, const Assert = require('@hapi/hoek/assert'); does not work for nodejs v16.18.1

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

import Joi from "joi";

 const schema = Joi.object({
    items: Joi.array().required(),
    skip: Joi.boolean()
 });

What was the result you got?

    Cannot find module '@hapi/hoek/assert' from 'index.js'
      at Resolver.resolveModule (../../node_modules/jest-resolve/build/index.js:259:17)
      at Object.<anonymous> (../../node_modules/joi/lib/index.js:3:16)

What result did you expect?

This should not throw any error.

Screenshot 2023-02-21 at 1 26 40 PM

Metadata

Metadata

Assignees

Labels

supportQuestions, discussions, and general support

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions