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

Closed
SanderElias opened this issue Jul 21, 2017 · 13 comments
Closed

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
Assignees
Milestone

Comments

@SanderElias
Copy link

@SanderElias SanderElias commented Jul 21, 2017

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:

/.../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)

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
@Marsup
Copy link
Contributor

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

@fabiob
Copy link

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

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Jul 21, 2017

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

@SanderElias
Copy link
Author

@SanderElias SanderElias commented Jul 22, 2017

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

@nrn
Copy link

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

@kanongil
Copy link
Contributor

@kanongil kanongil commented Jul 28, 2017

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

@nrn
Copy link

@nrn 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
@hueniverse hueniverse closed this in 104528c Aug 4, 2017
@nrn
Copy link

@nrn nrn commented Aug 4, 2017

Thanks for fixing this @hueniverse!

@barbalex
Copy link

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

@ArsalanDotMe
Copy link

@ArsalanDotMe ArsalanDotMe commented Nov 10, 2017

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?

@mathiasbynens
Copy link

@mathiasbynens mathiasbynens commented Dec 11, 2017

Seeing the same issue.

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

$ npm list podium
jsperf.com@2.0.0 ~/projects/jsperf.com
└─┬ hapi@16.6.2
  └── podium@1.2.5

@mathiasbynens
Copy link

@mathiasbynens mathiasbynens commented Dec 11, 2017

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

@lock
Copy link

@lock 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
9 participants