-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
NODEFS and NODERAWFS broken since v3.1.45 with node < v18.3.0 #21118
Comments
Good to know that someone is still targeting a version of node that old. We need to find a way to make those calls work with both wasm64 and old versions of node I guess. Can I ask why you are targetting such an old version of node? Are you planning on one day dropping support for older versions like that? I'm wondering when its reasonable for us to do that same. |
In fact I am using node v18.1.0 (with which my code cannot run as from emscripten v3.1.45), but I need to keep compatibility with node v12.16.0 for historical reasons (run on iOS). That’s why I build with -sMIN_NODE_VERSION=101900 (by the way, not sure which other versions I can safely use other than 101900). |
Can you explain what "run on iOS" means? How do you use node on iOS in your use case? For sure we need to support node version older than v18.3.0 so we need to fix this issue regardless. |
The previous `fs.writeSync` API was not available in Node.js 17.x, see: https://nodejs.org/api/fs.html#fswritesyncfd-buffer-options Also, do the same for `fs.readSync` to ensure compat with Node.js < v13.13.0. Resolves emscripten-core#21118.
I just opened PR #21863 for this. |
The previous `fs.writeSync` API was not available in Node.js 17.x, see: https://nodejs.org/api/fs.html#fswritesyncfd-buffer-options Also, do the same for `fs.readSync` to ensure compat with Node.js < v13.13.0. Resolves #21118.
Hi! Thanks a lot for the fix. When released, I will try to remove the post-processing sed to confirm it now works fine without it :-). |
Hi,
In #20077 the functions fs.readSync and fs.writeSync have been updated with signatures that did not exist in node v10.19.0 (for instance fs.writeSync with options was only added in node v18.3.0), which breaks running with any earlier version of node.
The four occurrences should really be rewritten as follows for them to work as expected as from node v10.19.0:
Thanks a lot for the fix!
Kind regards,
Maurice
The text was updated successfully, but these errors were encountered: