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

UnhandledPromiseRejectionWarning: /node_modules/p-limit/index.js:29 #52

Closed
JustinLien opened this issue Mar 11, 2021 · 4 comments
Closed

Comments

@JustinLien
Copy link

try {
  await result;
} catch {}

Can we throw an error here or just invoke next() in the catch? getting an UnhandledPromiseRejectionWarning during a build.

@papb
Copy link

papb commented Mar 12, 2021

The piece of code you posted does not generate an UnhandledPromiseRejectionWarning. Exceptions are caught. The reason must be something else.

@sindresorhus
Copy link
Owner

Duplicate of #33

@sindresorhus sindresorhus marked this as a duplicate of #33 Mar 12, 2021
@JustinLien
Copy link
Author

Long story short.

I was using NextJS as they required this npm package. I was using nvm LTS v14 node version and can build without any issue, however; my system was using v8 which failed to build during automation.

Upgrading my system to node to LTS v14 or greater should resolve the build issue I was having.

@zoobot
Copy link

zoobot commented Apr 1, 2021

I see multiple people opening this issue. Issue was also Node v8.11.1 for me. Its a cheap syntax change so it doesn't error on older installs, will likely save you time not having to close issues and save others time in having to sort through the error. I can't immediately upgrade node so had to edit the index file so it would run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants