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

Updating from 16.4.3 to 16.5.0: Podium.decorate is not a function error #3552

SanderElias opened this issue Jul 21, 2017 · 13 comments
dependency Update module dependency


Copy link

Are you sure this is an issue with hapi or are you just looking for some help?

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:

    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)

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

yarn add hapi@16.5.0 introduces the problem.
yarn add hapi@16.4.3 resolved the issue.

I repeated the steps a couple of times, and it is really the upgrade of hapi that triggers the issue.

  • node version: 8.2.0
  • hapi version: 16.5.0
  • os: ubuntu 16.04
Copy link

Marsup commented Jul 21, 2017

No issue with npm here, try to wipe your dependencies and reinstall, it looks like a yarn or local issue.

Copy link

fabiob commented Jul 21, 2017

#3542 only updates npm-shrinkwrap.json. package.json still points to "podium": "1.x.x".

So it looks like a packaging bug to me.

Copy link

I am not seeing the issue and I do not support yarn (in that I do not test deployments with it or use it).

Copy link

@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.

Copy link

nrn commented Jul 24, 2017

I know it's pretty edge case, but this error also happens with npm@5.3.0 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.

@hueniverse hueniverse added the dependency Update module dependency label Jul 25, 2017
Copy link

@nrn Your issue is likely due to using package-lock=false (See #3556).

Copy link

nrn commented Jul 28, 2017

@kanongil Unfortunately we do use the lock file, and haven't turned that setting off.

@hueniverse hueniverse self-assigned this Aug 4, 2017
@hueniverse hueniverse added this to the 16.5.1 milestone Aug 4, 2017
Copy link

nrn commented Aug 4, 2017

Thanks for fixing this @hueniverse!

Copy link

barbalex commented Aug 28, 2017

This happens to me with:

  • macOS 10.12.6
  • node 8.4
  • npm 5.3.0
  • hapi 16.5.2

The project is here:

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.

Copy link

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?

Copy link

Seeing the same issue.

$ npm list hapi
npm list ~/projects/
├─┬ glue@4.2.0
│ └── hapi@16.6.2  deduped
└── hapi@16.6.2

$ npm list podium ~/projects/
└─┬ hapi@16.6.2
  └── podium@1.2.5

Copy link

rm -rf node_modules && rm package-lock.json && npm install helped in our case.

Copy link

lock bot commented Jan 9, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
dependency Update module dependency
None yet

No branches or pull requests

9 participants