deno icon indicating copy to clipboard operation
deno copied to clipboard

`node:fs` doesn't have `openAsBlob` export

Open davidebombelli opened this issue 2 months ago • 3 comments

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

  1. Create file test.mjs with the following content:
import { openAsBlob } from 'node:fs';

const blob = await openAsBlob('README.md');
  1. 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';

davidebombelli avatar Oct 20 '25 22:10 davidebombelli

i will work on this

edilson258 avatar Oct 23 '25 08:10 edilson258

Just to help you out: https://github.com/denoland/deno/issues/27664#issuecomment-2888726897

jimmywarting avatar Nov 17 '25 20:11 jimmywarting

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

qupig avatar Dec 02 '25 13:12 qupig