Update for Node.js v20 Compatibility
matvejs16 opened this issue · 1 comments
Issue Description:
The AmyrAhmady/samp-node
repository currently does not support Node.js v20. This issue is created to request an update to ensure compatibility with Node.js v20.
Expected Behavior:
The samp-node
package should be updated to work seamlessly with Node.js v20, allowing users to utilize the latest features and security updates provided by this version.
Additional Information:
- The Node.js release schedule and LTS information can be found here: Node.js Release Schedule
Thank you for considering this request. We look forward to seeing samp-node
become compatible with Node.js v20.
It may also be possible not to upgrade and compile to the api level of node16 compatibility through something like swc, babel, esbuild.
Is there anyone who can help? The current LTS is v20.11.1.
need to update samp-node/deps
: v8, node, uv
reference 60ffe2d
and I don't know the right build command to generate x86 libnode.dll/so, which is suitable for Linux and Windows so that samp-node doesn't crash.
node build : https://github.com/nodejs/node/blob/v20.x/BUILDING.md
https://nodejs.org/docs/latest-v20.x/api/embedding.html#c-embedder-api
For windows, if successful, you may get the following files, which are located forward under samp-node/deps/node/lib/Release/win32
.\vcbuild dll x86 openssl-no-asm
- node/Release/libnode.dll
- node/Release/libnode.lib
- node/Release/lib/v8_libplatform.lib
- node/Release/libv8_libbase.lib
for samp-node with node v20, should use std:c++17, not 14
samp build: wiki
git clone https://github.com/AmyrAhmady/samp-node
git submodule update --init
cd samp-node
mkdir build
cd build
cmake .. -A win32 # wiki does not prompt to set Win32, usually your system is x64, so it will not be built as x86
Anyway, I tried to build it, but it didn't go well.
For windows, there are a lot of C4251: v8 ...
warnings, and although dll is eventually generated, it cannot be used properly.
For ubuntu, I use ./configure --dest-cpu ia32 --openssl-no-asm --shared
to build node, and then encounter an error from deps/zlib
.
If I don't bring the openssl-no-asm, it error aes/aes-586.S:3069: Error: junk at end of line, first unrecognized character is
%'`.