question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

std/fs: `walk` not found error is not `Deno.errors.NotFound`

See original GitHub issue

If you pass a path to walk that does not exist on the fs, the returned promise rejects with an Error, not a Deno.errors.NotFound.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
zhangyuanniecommented, Oct 6, 2021

Related https://github.com/denoland/deno_std/issues/1216 which contains steps to reproduce.

After some investigations, I believe it is due to the same underlying issue: Rust std::fs categorise Not a directory (ENOTDIR) error as Other instead of NotFound. That error then get propagated from lstat/stat op in Deno.

Worth noting that a new NotADirectory is available in Rust on nightly right now which will help with the issue.

So although far form ideal, it is expected that Deno.errors.NotFound is not returned from walk.

0reactions
kt3kcommented, Aug 29, 2022

If I put a file of the same name of walk entrypoint, then I get Error: Not a directory (os error 20), readdir './deno'. This might be the actual problem in the above line in fresh?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deno.errors | Runtime APIs
A set of error constructors that are raised by Deno APIs. ... NotFound) { console.error("the file was not found"); } else { //...
Read more >
Deno "NotFound: No such file or directory (os error 2)"
I've tried upgrading Deno and reloading the cache. I'm not even sure where to access the files that are in the stack trace...
Read more >
The Most Trusted Dating Site
Find a one-night stand or a hookup you can also hang out with. Which dating site is best for serious relationships? What is...
Read more >
IOr - ALBA.Net
Gara aradu nou contact, Disney snow white trailer 1937, Fxairguns, Error 27502 ... Isefra n tayri, Mansikka ahon liikuntahalli, No photos to import...
Read more >
Click here to download - Computer Science
the of and to a in for is on that by this with i you it not or be are from ... sl...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found