You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/hoek/lib/index.js:740 throw new Error(msgs.join(' ') || 'Unknown error'); ^ Error: Invalid schema content: at Object.exports.assert (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/hoek/lib/index.js:740:11) at Object.exports.schema (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/cast.js:67:10) at internals.Object.keys (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/object/index.js:309:35) at Object.exports.schema (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/cast.js:48:33) at internals.Object.keys (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/object/index.js:309:35) at Object.exports.schema (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/cast.js:48:33) at internals.Object.keys (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/object/index.js:309:35) at Joi.validate (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/lib/schema.js:107:71) at internals.Object._validateWithOptions (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/any/index.js:654:20) at module.exports.internals.Any.root.validate (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/index.js:121:23)
The text was updated successfully, but these errors were encountered:
Stumbled into this thread when investigating a Joi issue.
We were using @hapi/Joi "^15.1.1" across an application and tried to upgrade to 17.1.1 to fix a schema issue and thats when it all started to fall apart when the db libraries that use dynogels were pulled in and we started to see exceptions being thrown.
Then attempted to move to Joi since hapi was being deprecated anyways and still saw exceptions.
Have tried import * as Joi from "dynogels/node_modules/joi"; as per above suggestion but now we get
"errorType": "TypeError",
"errorMessage": "Cannot set property '_internals' of undefined",
when the db layer that uses dynogels is imported
Not feeling the Joi right now ;)
Will keep trying a few things to see if we can massage a solution into place
I cannot make even the simplest of schemas without getting an invalid schema error.
Code to reproduce
Main.ts
`
`
package.json
{ "name": "stackoverflowpost", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@hapi/hoek": "^9.0.4", "@types/dynogels": "^9.0.3", "@types/joi": "^14.3.4", "aws-sdk": "^2.735.0", "dynogels": "9.10.0", "joi": "^17.2.0", "typescript": "^3.9.7" } }
When I run
ts-node main.ts
I get the following error
/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/hoek/lib/index.js:740 throw new Error(msgs.join(' ') || 'Unknown error'); ^ Error: Invalid schema content: at Object.exports.assert (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/hoek/lib/index.js:740:11) at Object.exports.schema (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/cast.js:67:10) at internals.Object.keys (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/object/index.js:309:35) at Object.exports.schema (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/cast.js:48:33) at internals.Object.keys (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/object/index.js:309:35) at Object.exports.schema (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/cast.js:48:33) at internals.Object.keys (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/object/index.js:309:35) at Joi.validate (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/lib/schema.js:107:71) at internals.Object._validateWithOptions (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/types/any/index.js:654:20) at module.exports.internals.Any.root.validate (/Users/stephencuzzort/Projects/StackOverflowPost/node_modules/dynogels/node_modules/joi/lib/index.js:121:23)
The text was updated successfully, but these errors were encountered: