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

glob does not exist in node:fs and node:fs/promises #26927

Open
thonkinator opened this issue Nov 19, 2024 · 0 comments
Open

glob does not exist in node:fs and node:fs/promises #26927

thonkinator opened this issue Nov 19, 2024 · 0 comments
Labels
bug Something isn't working correctly node compat

Comments

@thonkinator
Copy link

thonkinator commented Nov 19, 2024

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

@thonkinator thonkinator changed the title glob does not exist in node:fs and node:fs/promises glob does not exist in node:fs and node:fs/promises Nov 20, 2024
@thonkinator thonkinator changed the title glob does not exist in node:fs and node:fs/promises glob does not exist in node:fs and node:fs/promises Nov 20, 2024
@bartlomieju bartlomieju added bug Something isn't working correctly node compat labels Nov 22, 2024
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 node compat
Projects
None yet
Development

No branches or pull requests

2 participants