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 }}
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
@std/esm seem to expect anything that is instanceof Error to have a stack property of type string, so when the error thrown have no such property, @std/esm would throw an error Cannot read property 'replace' of undefined
Expected Output
which could be produced with simply node index.js
work
Actual Output
TypeError: Cannot read property 'replace' of undefined
at MissingRefError.get (<cwd>/std-esm-repro-issue-259/node_modules/@std/esm/index.js:1:175661)
at process._87a.r.process.on (<cwd>/std-esm-repro-issue-259/index.js:5:21)
at process.emit (events.js:159:13)
at process._fatalException (bootstrap_node.js:382:26)
I met this when using the package ajv, which would throw a MissingRefError who has Error.prototype in the prototype chain but doesn't have property stack.
Consider the following
index.js
file run withnode -r @std/esm index.js
@std/esm
seem to expect anything that isinstanceof Error
to have astack
property of typestring
, so when the error thrown have no such property,@std/esm
would throw an errorCannot read property 'replace' of undefined
Expected Output
which could be produced with simply
node index.js
Actual Output
I met this when using the package
ajv
, which would throw aMissingRefError
who hasError.prototype
in the prototype chain but doesn't have propertystack
.Here's the repro repo: Mensu/std-esm-repro-issue-259
The text was updated successfully, but these errors were encountered: