New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Runtime raising TypeError
instead of Deno.errors.NotFound
#16737
Comments
Make sure your errors are registered like this: https://github.com/denoland/deno/blob/main/runtime/js/99_main.js#L255 and you provide Please re-open if this does not fix your issue. |
Is there an example which explicitly loads these runtime modules? |
Which modules are you asking about? |
All the modules in that directory (https://github.com/denoland/deno/tree/main/runtime/js), I naively would have thought they all got loaded somehow, but seems like that may not be the case given the situation with the errors. Although I think they still must be, or I wouldn't be able to use any of the things I am already using in the runtime. If they are indeed being loaded, then I should re-open this issue, since adding the |
Were you able to figure out how to register the errors and |
No, not reliably, I (unfortunately) ended up working around by matching error messages instead of trying to work with the error types |
When using the deno runtime crate (as recent as 0.86) I am definitely getting not found exceptions ("TypeError: No such file or directory (os error 2)") of a different error type than expected, which is causing things like
fs.exists
to fail. Working on a minimal reproduction, but figured worth filing this issue already as I'm 99% sure its a bug in the runtime, and may be helpful for others.The text was updated successfully, but these errors were encountered: