Closed sagarpanda closed 1 year ago
@sagarpanda Are you using node v12 ? Updating to node v14 worked for me
I have reverted everything in 17.8.3 (see https://github.com/hapijs/joi/issues/2914), but indeed expect that for the next major version. You are either using an old node or an old jest.
Thanks @Marsup
"joi": "^17.9.1" Is that a problem ?
"dependencies": {
"@bytemd/plugin-gfm": "^1.21.0",
"@bytemd/plugin-highlight": "^1.21.0",
"@bytemd/vue-next": "^1.21.0",
"@iconify/json": "^2.2.44",
"@pinia-plugin-persistedstate/nuxt": "^1.1.1",
"@pinia/nuxt": "^0.4.7",
"ant-design-vue": "^3.2.15",
"cos-js-sdk-v5": "^1.4.16",
"cos-nodejs-sdk-v5": "^2.11.19",
"joi": "^17.9.1",
"jsonwebtoken": "^9.0.0",
"less": "^4.1.3",
"md5": "^2.3.0",
"moment": "^2.29.4",
"mysql2": "^3.2.0",
"pinia": "^2.0.33",
"qcloud-cos-sts": "^3.1.0",
"sass": "^1.60.0",
"unplugin-icons": "^0.16.1",
"unplugin-vue-components": "^0.24.1",
"uuid": "^9.0.0"
}
{
"url": "/api/auth/login",
"statusCode": 500,
"statusMessage": "",
"message": "Cannot find module 'F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\chunks\\login.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?",
"stack": ""
}
It shouldn't be, if you're still having problems, maybe your lockfile is keeping old versions of things, then try to remove and re-add joi.
"joi": "^17.9.1" Is that a problem ?
"dependencies": { "@bytemd/plugin-gfm": "^1.21.0", "@bytemd/plugin-highlight": "^1.21.0", "@bytemd/vue-next": "^1.21.0", "@iconify/json": "^2.2.44", "@pinia-plugin-persistedstate/nuxt": "^1.1.1", "@pinia/nuxt": "^0.4.7", "ant-design-vue": "^3.2.15", "cos-js-sdk-v5": "^1.4.16", "cos-nodejs-sdk-v5": "^2.11.19", "joi": "^17.9.1", "jsonwebtoken": "^9.0.0", "less": "^4.1.3", "md5": "^2.3.0", "moment": "^2.29.4", "mysql2": "^3.2.0", "pinia": "^2.0.33", "qcloud-cos-sts": "^3.1.0", "sass": "^1.60.0", "unplugin-icons": "^0.16.1", "unplugin-vue-components": "^0.24.1", "uuid": "^9.0.0" }
{ "url": "/api/auth/login", "statusCode": 500, "statusMessage": "", "message": "Cannot find module 'F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\chunks\\login.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?", "stack": "" }
I HAVE "joi": "^17.9.2",
and i have the same problem
"Cannot find module 'G:\\cotizador\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from G:\\cotizador\\.output\\server\\chunks\\register.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?"
I use Nuxt 3.7.0 with Node.js version: 18.5.0 this is in production
"joi": "^17.9.1" Is that a problem ?
"dependencies": { "@bytemd/plugin-gfm": "^1.21.0", "@bytemd/plugin-highlight": "^1.21.0", "@bytemd/vue-next": "^1.21.0", "@iconify/json": "^2.2.44", "@pinia-plugin-persistedstate/nuxt": "^1.1.1", "@pinia/nuxt": "^0.4.7", "ant-design-vue": "^3.2.15", "cos-js-sdk-v5": "^1.4.16", "cos-nodejs-sdk-v5": "^2.11.19", "joi": "^17.9.1", "jsonwebtoken": "^9.0.0", "less": "^4.1.3", "md5": "^2.3.0", "moment": "^2.29.4", "mysql2": "^3.2.0", "pinia": "^2.0.33", "qcloud-cos-sts": "^3.1.0", "sass": "^1.60.0", "unplugin-icons": "^0.16.1", "unplugin-vue-components": "^0.24.1", "uuid": "^9.0.0" }
{ "url": "/api/auth/login", "statusCode": 500, "statusMessage": "", "message": "Cannot find module 'F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\chunks\\login.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?", "stack": "" }
我有,我有同样的问题
"joi": "^17.9.2",
"Cannot find module 'G:\\cotizador\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from G:\\cotizador\\.output\\server\\chunks\\register.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?"
我将Nuxt 3.7.0与Node一起使用.js版本:18.5.0,这是在生产中
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.
"joi": "^17.9.1" Is that a problem ?
"dependencies": { "@bytemd/plugin-gfm": "^1.21.0", "@bytemd/plugin-highlight": "^1.21.0", "@bytemd/vue-next": "^1.21.0", "@iconify/json": "^2.2.44", "@pinia-plugin-persistedstate/nuxt": "^1.1.1", "@pinia/nuxt": "^0.4.7", "ant-design-vue": "^3.2.15", "cos-js-sdk-v5": "^1.4.16", "cos-nodejs-sdk-v5": "^2.11.19", "joi": "^17.9.1", "jsonwebtoken": "^9.0.0", "less": "^4.1.3", "md5": "^2.3.0", "moment": "^2.29.4", "mysql2": "^3.2.0", "pinia": "^2.0.33", "qcloud-cos-sts": "^3.1.0", "sass": "^1.60.0", "unplugin-icons": "^0.16.1", "unplugin-vue-components": "^0.24.1", "uuid": "^9.0.0" }
{ "url": "/api/auth/login", "statusCode": 500, "statusMessage": "", "message": "Cannot find module 'F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from F:\\project-lmq\\learn-self-study\\bingo-book\\j-book-demo\\.output\\server\\chunks\\login.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?", "stack": "" }
我有,我有同样的问题
"joi": "^17.9.2",
"Cannot find module 'G:\\cotizador\\.output\\server\\node_modules\\@hapi\\hoek\\lib\\assert' imported from G:\\cotizador\\.output\\server\\chunks\\register.post.mjs\nDid you mean to import @hapi/hoek/lib/assert.js?"
我将Nuxt 3.7.0与Node一起使用.js版本:18.5.0,这是在生产中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, I did it with this
https://github.com/nuxt/nuxt/discussions/23065#discussioncomment-6939569
Support plan
Context
joi
const Assert = require('@hapi/hoek/assert');
does not work for nodejs v16.18.1What are you trying to achieve or the steps to reproduce?
What was the result you got?
What result did you expect?
This should not throw any error.