deno
deno copied to clipboard
`node:fs` doesn't have `openAsBlob` export
Summary
When trying to use the method openAsBlob from node:fs, an exception is thrown.
Version
deno 2.5.4 (stable, release, x86_64-unknown-linux-gnu)
v8 14.0.365.5-rusty
typescript 5.9.2
OS
Linux Mint 22 Wilma
Steps to reproduce
- Create file
test.mjswith the following content:
import { openAsBlob } from 'node:fs';
const blob = await openAsBlob('README.md');
- Run file
deno test.mjs.
Error
error: Uncaught SyntaxError: The requested module 'node:fs' does not provide an export named 'openAsBlob'
import { openAsBlob } from 'node:fs';
i will work on this
Just to help you out: https://github.com/denoland/deno/issues/27664#issuecomment-2888726897
Why does the documentation say it's unstable, but it's not listed in the Unstable feature flags?
https://docs.deno.com/api/node/fs/~/openAsBlob
Of course, it's not in the source code either: https://github.com/denoland/deno/blob/main/ext/node/polyfills/fs.ts