Skip to content
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

Node FileHandle#stat() not implemented #23301

Closed
littledivy opened this issue Apr 10, 2024 · 1 comment · Fixed by #26719 · May be fixed by #24391
Closed

Node FileHandle#stat() not implemented #23301

littledivy opened this issue Apr 10, 2024 · 1 comment · Fixed by #26719 · May be fixed by #24391
Labels
bug Something isn't working correctly good first issue Good for newcomers node API Related to various "node:*" modules APIs node compat

Comments

@littledivy
Copy link
Member

Getting a wall of these warnings when running docusaurus serve:

[WARNING] The image at "/home/divy/gh/littledivy/my-website/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg" can't be read correctly. Please ensure it's a valid image.
handle.stat is not a function
@manzt
Copy link
Contributor

manzt commented Oct 29, 2024

Coming across this ass well. Somewhat surprising as the API is documented in the deno docs:

deno --version
deno 2.0.3 (stable, release, aarch64-apple-darwin)
v8 12.9.202.13-rusty
typescript 5.6.2
import * as fs from "node:fs/promises";

let fh = await fs.open("foo.txt", "w");
let stats = fh.stat()
deno run --allow-write main.ts
# error: Uncaught (in promise) TypeError: fh.stat is not a function
# let stats = fh.stat()
#                ^
#     at file:///Users/manzt/demos/fsstat/main.ts:4:16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly good first issue Good for newcomers node API Related to various "node:*" modules APIs node compat
Projects
None yet
3 participants