-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
The "fd" argument must be of type number. Received null - Erroring in recent Node versions 20 and 21 #50979
Comments
Can you share a minimal reproducible example without 3rd party libraries and a stacktrace? |
Sure I'll create one in the next few hours. It was thrown in the dirty db implementation so it shouldn't be too hard to track that down. |
@marco-ippolito Here is the example. I just put it into a test so I can easily start it from webstorm import {describe, it} from "vitest";
import {TMP_PATH} from "./config";
import fs, {createWriteStream} from "fs";
describe('test-node-failure', () =>{
it('should allow .on load to chain to constructor', async function () {
let path = "test.txt"
let _writeStream = createWriteStream(path, {
encoding: 'utf-8',
flags: 'a',
});
let _queue = new Map();
let key = 'key';
const cbs = _queue.get(key) || [];
_queue.set(key, cbs);
_writeStream.cork();
for (const [key, _] of _queue) {
_queue.delete(key);
const data = `${JSON.stringify({key, val: "test"})}\n`;
_writeStream.write(data, (err) => {
console.log(err)
});
}
_writeStream.uncork();
});
}); |
Stacktrace looks like this:
|
nodejs-github-bot
pushed a commit
that referenced
this issue
Dec 7, 2023
PR-URL: #50994 Fixes: #50979 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Raz Luvaton <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
RafaelGSS
pushed a commit
that referenced
this issue
Dec 15, 2023
PR-URL: #50994 Fixes: #50979 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Raz Luvaton <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
richardlau
pushed a commit
that referenced
this issue
Mar 25, 2024
PR-URL: #50994 Fixes: #50979 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Raz Luvaton <[email protected]> Reviewed-By: Robert Nagy <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v21.2.0
Platform
Linux/MacOS/Windows - same error on all three platforms
Subsystem
No response
What steps will reproduce the bug?
git clone [email protected]:ether/ueberDB.git && git checkout fix/tests
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
It should run without a problem.
What do you see instead?
TypeError: The "fd" argument must be of type number. Received null
Additional information
No response
The text was updated successfully, but these errors were encountered: