Skip to content

Missing statfs export of node:fs/promises #31526

Closed

Description

@marvinhagemeister

The wuchale npm package uses statfs from node:fs/promises which currently doesn't exist in Deno. This makes the package fail.

See https://github.com/wuchalejs/wuchale/blob/138fadd9bbdf244fef69de275ba7ba81ef7a24c2/packages/wuchale/src/handler.ts#L6
Node Docs: https://nodejs.org/api/fs.html#fspromisesstatfspath-options

Steps to reproduce

Run this code snippet:

import { statfs } from "node:fs/promises";

const res = await statfs(import.meta.filename!);
console.log(res);

Version: Deno 2.5.6

Activity

  1. added
    bug
    on Dec 8, 2025
  2. denobot commented on Dec 8, 2025

    @denobot
    Collaborator

    Triage Analysis

    Issue Type: Node.js compatibility bug

    Summary: The statfs function was implemented for node:fs (callback-based API) in PR #22862 (March 2024), but the corresponding export from node:fs/promises was not added. This breaks npm packages like wuchale that import statfs from the promises API.

    Completeness: ✅ This issue is well-documented with:

    • Clear reproduction steps
    • Real-world use case (wuchale package)
    • Node.js documentation reference
    • Minimal code example
    • Version information

    Related Issues:

    Recommendation: This should be straightforward to fix since the underlying implementation already exists. The promises export needs to be added alongside the existing callback-based API.

    Labels Applied:

    • bug - Missing API functionality
    • node compat - Node.js compatibility issue
    • good first issue - Should be simple to add the promises export
    • ai:triage - AI-assisted triage

    This response was generated by AI and may contain mistakes. If you didn't find it useful, please add a "thumbs down" reaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugnode compat

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions