Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

got an error in nextjs 13.4.4:TypeError: Cannot read properties of undefined (reading '$_root') #2952

Open
crazy-max-js opened this issue May 29, 2023 · 1 comment
Labels
support Questions, discussions, and general support

Comments

@crazy-max-js
Copy link

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: 18.15.0
  • module version with issue: 17.9.2
  • last module version without issue: 17.9.2
  • environment (e.g. node, browser, native): nextjs
  • used with (e.g. hapi application, another framework, standalone, ...):
  • any other relevant information:

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

fix error

const some = 'properly formatted code example';

What was the result you got?

TypeError: Cannot read properties of undefined (reading '$_root')

What result did you expect?

no error

@crazy-max-js crazy-max-js added the support Questions, discussions, and general support label May 29, 2023
@crazy-max-js
Copy link
Author

oh I found the cause of the error!
cause error:
const {validate} = Joi.object({
username: Joi.string().required()
})
const result =validate({
username: '666'
})
fix error:
const temp = Joi.object({
username: Joi.string().required()
})
const result = temp.validate({
username: '666'
})
I don't know if this is a bug or not。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support Questions, discussions, and general support
Projects
None yet
Development

No branches or pull requests

1 participant