Encountering UnhandledPromiseRejection Error with Sonatype Nexus npm Grouped Repository

46 Views Asked by At

I'm currently utilizing Sonatype Nexus to host and manage npm artifacts in my project. When I utilize a proxy-type npm repository within Nexus, my project builds successfully. However, when I switch to using an npm grouped repository in Nexus, which combines both npm hosted and npm proxy repositories, I encounter the following error during the build process:

[INFO]      [exec] CODEGEN ANGULAR APP: Generating the angular App...
[INFO]      [exec] node:internal/process/promises:288
[INFO]      [exec]             triggerUncaughtException(err, true /* fromPromise */);
[INFO]      [exec]             ^
[INFO]      [exec] 
[INFO]      [exec] [UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "[object Array]".] {
[INFO]      [exec]   code: 'ERR_UNHANDLED_REJECTION'
[INFO]      [exec] }
[INFO]      [exec] 
[INFO]      [exec] Node.js v18.16.1
[INFO] -----------------

It seems that the issue arises specifically when I use the npm grouped repository type in Nexus, which combines both hosted and proxy repositories. The error message suggests an unhandled promise rejection.

I'm seeking guidance on how to troubleshoot and resolve this issue. Any insights or suggestions would be greatly appreciated. Thank you

Note: My hosted repo has some packages that are needed when the project is built and those that don't have them will fetch from a proxy. And without using a hosted repo and by creating a dummy hosted one, is also working,

0

There are 0 best solutions below