You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected UnhandledPromiseRejectionWarning with Node-API library on Node 12.2.0 on Ubuntu #7621
Only present in 12.2.0 with Node-API library enabled (afaik, double check!)
$ ts-node ./script.ts
(node:1874) UnhandledPromiseRejectionWarning: Error:
at /home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/client/runtime/index.js:22747:77
at new Promise (<anonymous>)
at NAPIEngine.start (/home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/client/runtime/index.js:22744:31)
at NAPIEngine.request (/home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/client/runtime/index.js:22815:9)
at cb (/home/runner/work/e2e-tests/e2e-tests/generic/basic/node_modules/@prisma/client/runtime/index.js:33760:26)
(node:1874) UnhandledPromiseRejectionWarning: Unhandled promise rejection. 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(). (rejection id: 2)
(node:1874) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
changed the title [-]Node-API library on Node 12.2.0 on Ubuntu[/-][+]Unexpected UnhandledPromiseRejectionWarning with Node-API library on Node 12.2.0 on Ubuntu[/+]on Jun 15, 2021
I've just had a quick look at this. This is the actual error that is causing this
Error
at main (/home/will/Prisma/scratch-pad/script.js:24:18)
at Object.<anonymous> (/home/will/Prisma/scratch-pad/script.js:30:1)
at Module._compile (internal/modules/cjs/loader.js:776:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12)
at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
at internal/main/run_main_module.js:17:11 {
code: 'InvalidArg'
}
It seems that this is a node-api issue. Versions Nodejs v12.0.0 -> 12.5.0 will throw this error but it works from v12.6.0 onwards (This may be related to this PR). Below is a small reproduction
Activity
janpio commentedon Jun 12, 2021
related: prisma/ecosystem-tests#1750
[-]Node-API library on Node 12.2.0 on Ubuntu[/-][+]Unexpected UnhandledPromiseRejectionWarning with Node-API library on Node 12.2.0 on Ubuntu[/+]williamluke4 commentedon Aug 16, 2021
I've just had a quick look at this. This is the actual error that is causing this
It seems that this is a node-api issue. Versions Nodejs v12.0.0 -> 12.5.0 will throw this error but it works from v12.6.0 onwards (This may be related to this PR). Below is a small reproduction
pantharshit00 commentedon Aug 20, 2021
I guess we can bump requirement to 12.6 when we release this to stable.
janpio commentedon Aug 20, 2021
Will be avoided via #8839