deno icon indicating copy to clipboard operation
deno copied to clipboard

`resolveObjectURL` from `node:buffer` not supported in Deno

Open kevgeoleo opened this issue 3 months ago • 2 comments

Version: Deno 2.5.3

Hi,

I would like to report a behavior I observed when running the following code snippet:

import { resolveObjectURL } from 'node:buffer'

Running this gives the following error:

PS C:\Users\Kevin\Downloads\a\29_09_2025> deno run 12322_toreport.js
error: Uncaught SyntaxError: The requested module 'node:buffer' does not provide an export named 'resolveObjectURL'
import { resolveObjectURL } from 'node:buffer'
         ^
    at <anonymous> (file:///C:/Users/Kevin/Downloads/a/29_09_2025/12322_toreport.js:5:10)

This module works in NodeJS. The Deno compatibility documentation also mentions that it supports node:buffer (https://docs.deno.com/api/node/#data-%26-streams)

kevgeoleo avatar Oct 08 '25 12:10 kevgeoleo

Similar here

Error during bundling: Error: Unable to output during bundling: load_transformed failed: failed to analyze module: failed to resolve node:buffer from https://esm.sh/[email protected]/denonext/js-base64.mjs: Cannot resolve "node:buffer" from "https://esm.sh/[email protected]/denonext/js-base64.mjs".
    at __wbg_new_28c511d9baebfa89 (https://deno.land/x/[email protected]/emit.generated.js:556:19)
    at <anonymous> (wasm://wasm/0117e6ea:1:3511618)
    at <anonymous> (wasm://wasm/0117e6ea:1:483251)
    at <anonymous> (wasm://wasm/0117e6ea:1:2079267)
    at <anonymous> (wasm://wasm/0117e6ea:1:3235516)
    at __wbg_adapter_46 (https://deno.land/x/[email protected]/emit.generated.js:246:8)
    at real (https://deno.land/x/[email protected]/emit.generated.js:231:14)
    at ext:core/01_core.js:295:9
    at eventLoopTick (ext:core/01_core.js:179:7)

exside avatar Oct 17 '25 19:10 exside

@marvinhagemeister

I'd like to work on this issue if it's still available.
This looks like a straightforward addition to the node:buffer polyfill, and I’m happy to prepare a PR for implementing resolveObjectURL along with tests.

Could you please assign this to me?

Karthikeya1500 avatar Nov 26 '25 07:11 Karthikeya1500