Closed khmelevskii closed 6 years ago
Likely a version mismatch but since you didn't provide any...
sorry:
"good": "^7.3.0",
"good-squeeze": "^5.0.2",
"hapi": "^17.2.0",
@khmelevskii good v7 isn't compatible with hapi 17, you need to install the v8 release candidate
"good": "8.0.0-rc1"
I'm getting the "name" is required
error running hapi 17 as well.
According to the hapi
docs, of the possible exported values from a plugin:
exports.plugin = { register, name, version, multiple, dependencies, once, pkg }
The following values are required: register
, name
.
See: https://github.com/hapijs/hapi/blob/master/API.md#plugins
However, of these required values, I only see register
exported by good
: https://github.com/hapijs/good/blob/master/lib/index.js#L27-L42
^ This is for good@8.0.1
running hapi@17.2.0
.
Please ignore my last couple of comments on this issue. The "name" is required
error I was seeing was coming from another, improperly register plugin, not good
.
@jeromecovington May I know what plugin is it? I am having the same issue with hapi-auth-jwt2. I need desperately to solve this, it was months my app was down. I am in serious trouble...
Make sure the plugins you use are compatible with your hapi version, it's not really about a specific plugin, could be any.
I've downgraded and tested the deps one by one and I've managed to make it work. I will comment here for anyone with the same issue after upgrading hapi.js and hapi.js plugins.
The problem seens to be, the newer versions of hapi.js and newers plugins don't work properly with es2018 code style.
Joi can't be part of the issue, it has to be something registered with hapi. You can probably check quickly which it is by requiring all of them and checking the keys, anything out of the ordinary will likely be your culprit.
For me I supect the problem wast with hapi-auth-jwt2 and hapi-postgres-connection. As I said, I tested one by one, and after downgrading Hapi and those two plugins, it suddenly worked. I have no idea how, or why, and again I supect its something related to babel transpiling es2018 code, because I use preset-env and I write with the most recent features of ECMA.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Error: