Capacitor-NodeJS
Capacitor-NodeJS copied to clipboard
node.js upgrade
First of all . very nice work.
I was wondering if there is a way to upgrade the node.js version . I saw that the current version is v12.19.0.
I am not familiar with android but I was wondering if by upgrading the libnode will do . Please tell me if I can help . Node.js v17 and v18 have many nice features
Unfortunately its not possible to upgrade the NodeJS engine (for now) because the creator of nodejs-mobile doesn't maintain the project anymore.
I plan to fork the repository this summer or fall, to provide the latest NodeJS versions (maybe with a script in the plugin so you can choose your preferred node version).
Good News!
Recently two new PRs were opend in the nodejs-mobile repo to bump the node version to v16 and v18:
- https://github.com/nodejs-mobile/nodejs-mobile/pull/3
- https://github.com/nodejs-mobile/nodejs-mobile/pull/7
Once the PRs are merged I will update the nodejs part of this CapacitorJS plugin.
Version 1.0.0-beta.2 has just been released, which is now based on node.js v16.17.1.
That is fantastic. I will try it . thank you
https://github.com/nodejs-mobile/nodejs-mobile/releases/tag/v18.17.1 was just released
@jrobeson A new version with Node.js 18 will be released in the next few days.
I noticed that for the react-native plugin they rewrote the integration to use v8, but there should be a way to just re-enable linkedBinding instead of having to move away from using n-api. It would be nice to find a node dev to talk to see if we can solve this better.
@jadejr I actually planned to completely rework the native bridge anyway because I'm not satisfied with the current state. At the moment it's still a copy-pasta of the old Cordova plugin, as I had no C/C++ experience a few years ago when I started with the plugin.
Originally I planned the rework for next year as I don't have that much time at the moment. If we can't reuse the current code for nodejs-mobile v18.x, the corresponding release of this plugin will be delayed. If this is really the case, I could temporarily take over some parts of the react-native plugin bridge until I have more time for the full rework.
@hampoelz: What would it take to just use the updated cordova version as done here? https://github.com/okhiroyuki/nodejs-mobile-cordova/pull/26
The plugin now ships with nodejs-mobile v18.17.2. Sorry for the long delay.
For the future, I plan to create some workflows for automated tests and upgrades to provide the plugin faster with newer Node.js versions.