Closed JustinLien closed 3 years ago
The piece of code you posted does not generate an UnhandledPromiseRejectionWarning
. Exceptions are caught. The reason must be something else.
Duplicate of #33
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.
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.
Can we throw an error here or just invoke next() in the catch? getting an UnhandledPromiseRejectionWarning during a build.