Open CherryDT opened 4 years ago
Same here for Node v13.0.1. But it's the async-listener package that's causing this since it's overriding the core Promise class with a custom one WrappedPromise.
`-- appmetrics@5.1.1
`-- ibmapm-embed@20.3.0
`-- zipkin-context-cls@0.6.1
`-- continuation-local-storage@3.2.1
`-- async-listener@0.6.10
this is the dependency package list for which package requires what ending at the async-listener package.
But as a work around you can try using
const wait = ms => new Promise(_ => setTimeout(_, ms));
instead of the promisify package on setTimeout
node v12.10.0, appmetrics v5.1.1
Test case:
Result without appmetrcis:
Result with appmetrics:
It seems as if for some reason
promisify
would not respectsetTimeout
's customutil.promisify.custom
handler in this case!EDIT: After further testing, it seems that after including
appmetrics/start
, for some reasonsetTimeout
andsetImmediate
are now missing theutil.promisify.custom
symbol property entirely! Also, confusingly, this does not happen when I do it from a node REPL.