TritonDataCenter / node-verror

Rich JavaScript errors
MIT License
1.18k stars 61 forks source link

VError with webpack 5 in node 16 is not appearing as instanceof Error #91

Closed dls314 closed 1 year ago

dls314 commented 1 year ago

When I recently switched a project that builds using webpack 5 to node 16 (from node 14), my log statements started including cause is not an Error when logging out VError instances that contain other VError instances as their cause.

I'm uncertain if this is a webpack issue (non-webpack packaged unit tests will assert that VError is an instance of Error), or only an issue when combining webpack 5 and node 16.

Any insights that you could share?