pacote-old: A promise was created in a handler error
This following error is consistently showing up when my team and I run npm install on one of our projects. It wasn’t happening a couple weeks ago.
(node:58234) Warning: a promise was created in a handler at /Users/miles_johnson/.nvm/versions/node/v8.9.1/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/tarball.js:39:25 but was not returned from it, see http://goo.gl/rRqMUw
at ret (eval at makeNodePromisifiedEval (/Users/miles_johnson/.nvm/versions/node/v8.9.1/lib/node_modules/npm/node_modules/bluebird/js/release/promisify.js:184:12), <anonymous>:8:21)
I’m guessing because this line (https://github.com/zkat/pacote/blob/latest/lib/fetchers/registry/tarball.js#L43) is not returning. Seems that was last touched 2 months ago, which sort of aligns with this showing up for us.
Node: 8.9.1 NPM 5.8.0
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 2
- Comments: 24 (11 by maintainers)
Commits related to this issue
- fix(tarball): Remove promise handler error (#148) Fixes: #145 — committed to zkat/pacote-old by redonkulus 9 years ago
- pacote@8.1.1 PR-URL: https://github.com/zkat/pacote/pull/148 Fixes: https://github.com/zkat/pacote/issues/145 Credit: @redonkulus Reviewed-By: @zkat — committed to npm/npm by iarna 9 years ago
- Update to lastest version of npm https://github.com/zkat/pacote/issues/145 was polluting the logs, nearly impossible to see anything else — committed to bpanel-org/bpanel by deleted user 9 years ago
It’ll be done when it’s done
Sorry @zkat , I think I really underrated your valuable work regarding pacote! Since most of the people don’t have any clue what is behind the scenes of npm. Thanks!
cool. In any case, this is fixed in
pacote@8.1.1, and will be included with the next npm release (which should be next week, I think).@fernan256 it’ll be done when it’s done.
@zkat @fernan256 I took a stab at it: https://github.com/zkat/pacote/pull/148
When you create a promise in a
thenyou should generally return it because otherwise it is possible it’s not being listened to and can cause an unhandled rejection.If you explicitly want to opt out of it you have two options
return nullI recommend fixing the core issue (that there is a promise no one is listening to) though 😃