glob
does not exist in node:fs
and node:fs/promises
#26927
Open
Description
Version: Deno 2.0.6
The Deno docs specify that glob
and globSync
should be exported from node:fs
and glob
from node:fs/promises
, but these seem to not be exported or defined.
error: Uncaught SyntaxError: The requested module 'node:fs' does not provide an export named 'glob'
import { glob } from "node:fs";
^
error: Uncaught SyntaxError: The requested module 'node:fs' does not provide an export named 'globSync'
import { globSync } from "node:fs";
^
error: Uncaught SyntaxError: The requested module 'node:fs/promises' does not provide an export named 'glob'
import { glob } from "node:fs/promises";
^
import fs from "node:fs";
import fsp from "node:fs/promises";
console.log(fs.glob, fs.globSync, fsp.glob); // undefined undefined undefined
edit: also, if Deno is actually supposed to add glob
and globSync
, shouldn't an equivalent function be available from Deno's built-in filesystem api? it seems strange to only add it to node:fs