I'm not entierly sure this issue is originating from hapi itself, but when I update to 16.5.0 and I do a request, I get this error:
/.../node_modules/hapi/lib/request.js:63
Podium.decorate(this, internals.emitter);
^
TypeError: Podium.decorate is not a function
at new internals.Request (/.../node_modules/hapi/lib/request.js:63:12)
at module.exports.internals.Generator.internals.Generator.request (/.../node_modules/hapi/lib/request.js:32:21)
at Server.<anonymous> (/.../node_modules/hapi/lib/connection.js:260:48)
at emitTwo (events.js:125:13)
at Server.emit (events.js:213:7)
at parserOnIncoming (_http_server.js:602:12)
at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
(I replaced the long path tih ... for readability)
yarn add [email protected] introduces the problem.
yarn add [email protected] resolved the issue.
I repeated the steps a couple of times, and it is really the upgrade of hapi that triggers the issue.
No issue with npm here, try to wipe your dependencies and reinstall, it looks like a yarn or local issue.
npm-shrinkwrap.json. package.json still points to "podium": "1.x.x".So it looks like a packaging bug to me.
I am not seeing the issue and I do not support yarn (in that I do not test deployments with it or use it).
@hueniverse Ok, that's fair. But the issue @fabiob pointed at, can you still make that change? It would solve it, and make the package.json more in sync with what is actually needed.
I know it's pretty edge case, but this error also happens with [email protected] if you have a project that has two different deps that rely on hapi, and one uses 16.3 and the other uses 16.5.
@nrn Your issue is likely due to using package-lock=false (See https://github.com/hapijs/hapi/issues/3556).
@kanongil Unfortunately we do use the lock file, and haven't turned that setting off.
Thanks for fixing this @hueniverse!
This happens to me with:
The project is here: https://github.com/FNSKtZH/apflora_api
Exact same project runs fine under Windows 10.
I nuked node_modules several times but the issue remains.
npm list hapi shows only a single hapi installation, v16.5.2.
npm list podium shows that podium is installed as dependency of hapi in v1.2.5.
Adding podium 1.3.0 as peerDependency solved the issue.
Can confirm that on npm 5.x, somehow podium 1.2.5 is installed even with hapijs 16.5.2. Can we have a patch in hapi v16 that explicitly sets the version for podium?
Seeing the same issue.
$ npm list hapi
npm list [email protected] ~/projects/jsperf.com
โโโฌ [email protected]
โ โโโ [email protected] deduped
โโโ [email protected]
$ npm list podium
[email protected] ~/projects/jsperf.com
โโโฌ [email protected]
โโโ [email protected]
rm -rf node_modules && rm package-lock.json && npm install helped in our case.
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.
Most helpful comment
rm -rf node_modules && rm package-lock.json && npm installhelped in our case.