-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Open
Description
Version
deno 2.7.5 (stable, release, x86_64-unknown-linux-gnu)
v8 14.6.202.9-rusty
typescript 5.9.2
Steps to reproduce
- Create file
test.jswith the following content:
import { open } from 'node:fs/promises';
const fd = await open('README.md', 'r');
fd.readLines()
fd.close();- Create a valid
file.txtfile in the same folder. - Run the file like
deno -A test.js.
Expected Behaviour
in Node.js, no output is printed and no error is thrown.
Actual Behaviour
error: Uncaught (in promise) BadResource: Bad resource ID
at Module.read (ext:deno_io/12_io.js:48:28)
at ext:deno_node/_fs/_fs_read.ts:82:26
at Module.read (ext:deno_node/_fs/_fs_read.ts:88:5)
at ext:deno_node/internal/fs/streams.mjs:234:8
at new Promise (<anonymous>)
at ReadStream._read (ext:deno_node/internal/fs/streams.mjs:232:9)
at ReadStream.read (node:_stream_readable:617:12)
at maybeReadMore_ (node:_stream_readable:756:12)
at processTicksAndRejections (ext:core/01_core.js:378:17)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels