Skip to content
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

Compatibility with node v18 and v20 #88

Open
rafiqlightwala opened this issue Jan 11, 2024 · 3 comments
Open

Compatibility with node v18 and v20 #88

rafiqlightwala opened this issue Jan 11, 2024 · 3 comments

Comments

@rafiqlightwala
Copy link

I understand the owner of this repo is likely busy, but it would be great if the library stays compatible with latest node versions? Otherwise some instructions on how to do it manually in the readme can help. Thanks!

@toniremi
Copy link

toniremi commented Jan 25, 2024

For anyone else having this problem I was able to fix this by building the library manually on my laptop.
You can do this using the following steps:

  1. On your project if possible downgrade to Node.JS 16 using any Node version manager like n or nvm.
  2. There install this library as usual. This will create the node_modules folder structure and everything but the library will be running using Node 16.
  3. Once that is done download this Github repository manually.
  4. Open a terminal in the Github repository and switch back your Node version to the version you want to compile or work with. In my case that was Node 18.
  5. Execute the npm install command. This will build the library and should generate a binary with your desired node version on the following folder {github-project}/lib/binding/Release/node-v{your node version}-darwin-x64
  6. Copy the folder matching your version from the binding/Release folder. In my case for Node 18 that would be node-v108-darwin-x64
  7. Go to your original project to your node_modules folder where you installed tulind using Node 16. Search for the same path lib/binding/Releases and copy there the folder containing the binary compiled with your desired Node version. In my case after copying it my _node_module/tulind/lib/binding/Release folder had 2 folders inside. One called node-v93-darwin-x64 containing the binary for Node 16 and the new copied one called node-v108-darwin-x64 containing the binary for Node 18.
  8. Once that is done make sure you are running your desired Node version and then execute the command npm install or npm rebuild.
  9. That is it you should have now compiled and added manually the tulind binary for your desired Node version. Hope this helped others as I was also having this same problem.

@rafiqlightwala
Copy link
Author

Hi @toniremi
Thanks for such detailed steps. While this will make it work on your local computer, it will not work when you deploy it on a server with a different node version or even a different architecture. Correct me if i am wrong

@toniremi
Copy link

Hello there,

This is a temporary solution only.

Something you will need to do manually on your server, workspace or local environment to make the library work. If you change Node version then you will have to do this process again to build the binary with the new version. If you do remove the node_modules folder then you will have to do this process again as well. But other than that if you deploy to a backend and upload the node_modules or do this steps on your server it should be working fine.

But by no means is this a permanent solution, only solution is for the repository to be updated and have this fixed or for the links with the resources on AWS to be updated/restored with the correct binaries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants