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
A feasible solution to "upgrade" Node.js to v18.15.0 #120
Comments
Tried it today and it doesn't work for me. |
Worked for me! Thanks @primovist |
Worked for me on DS1821+ Thx ! |
Need install package Node.js v18 first. |
This is installed, of course. |
maybe DSM 7.0+?Someone posted that they can use this. |
The initial instructions had the wrong variable name. Double-check that it's Worked for me on DSM 7.1.1-42962 Update 4 |
No im a litte bit confused.. `#!/bin/sh 1 - > NODE_BIN_PATH="/var/packages/homebridge/target/app/bin" export HB_SERVICE_STORAGE_PATH="$(readlink -f /var/packages/homebridge/shares/homebridge)" this is a part of my source file correct? |
forgot 'export'? |
Don’t think so. I’ve only changed the part between the quotation marks. |
I just tried this and didn't seem to work for me. I've modified the lines mentioned. Saved file, restarted Homebridge, but when it comes up, I see the same Node.js version I saw before - 16.20.0 Node.js 18 is installed and running and as expected, that directory exists, not seeing any sort of me pointing to something that doesn't exist. Running DSM 7.1.1-42962 Update 4 on DS920+ I'm guessing I'm missing something obvious to someone, just not me. It's a head-scratcher. |
the symbols different between “”and""? |
Thank you, I adjusted that. However, still having the same problem. NODE_BIN_PATH="/var/packages/Node.js_v18/target/usr/local/bin" When I restart, the Node.js version is kept at the 16.x release. Unsure if this is a valid test / attempt, but if I use terminal and from there, try to do a The version of Node.js that is installed on Synology is 18.12.x, but HB is trying to install a newer release. I'd have thought that should work, but just checking. Even if this was a "problem", I tried to do an update to 18.11 (behind what I have installed) and same thing, it just isn't happy with anything 18.x. Just odd as it's saying that DSM 7 does not currently support 18.x but of course, it does. Is NODE_BIN_PATH the same as Node.js Path and if so, then there is some issue as Node.js path is different: Homebridge Terminal for Synology DSM Node.js Version: v16.20.0 Thanks! |
2023年4月28日 07:55,Brendan Thompson ***@***.***> 写道:
I can get to the last step where I need to run hb-service update-node, I am SSHed into the NAS and sudo'ed into root and I still get:
[CleanShot 2023-04-28 at 09 54 50]<https://user-images.githubusercontent.com/2595712/235014358-02b7ab7d-d671-44b7-a7df-4106b281a65a.png>
—
Reply to this email directly, view it on GitHub<#120 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AARDOC6AWDUW7HWUFSHKOALXDMBO3ANCNFSM6AAAAAAWSAR5EU>.
You are receiving this because you commented.Message ID: ***@***.***>
No need to run hb-service update-node, just restart Homebridge package.
|
Just to clarify, you just have to change the two variable names and then STOP and START again the Homebridge package from the Synology Package Center. The problem is that the Hue plugin requires v18.16.0+ and Synology only provides 18.12.0 🤷♂️ No big deal as it works with 18.12.0 too just fine though. Complete instructions:
|
I see my issue. The "" if you copy them from above they are in the wrong format. |
I suggest to follow the instructions I posted here as they are 100% correct |
@FezVrasta I followed your instruction and now the version is v18. But I start to see |
I went around in circles trying to get this to work but no luck following the very helpful instructions above from @FezVrasta. In the end what worked for me was completing the steps shown in this thread and then (and only then) installing Node.js v18 from the Synology Package Center, before finally stoping and restarting Homebridge. It makes no sense to me why installing the Node.js package last (rather than first) would make a difference but adding this experience in case anyone else was following normal logic and getting nowhere fast, to see if this works for you. This is on DSM 7.2-64561 (Release) running on a RS1221+ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Not stale |
FezVrasta's approach worked for me, really helpful. Thanks to everyone on the thread. |
For the people looking to upgrade the nodejs version and other components I have been working thru refreshing the package, and am almost ready to publish it. If you have some time, and want to try out a new version I have the various packages built here. https://github.com/NorthernMan54/homebridge-syno-spk/releases/tag/3.0.15 If you scroll to the bottom of the page, the various packages are available for each hardware flavour. Am thinking an update approach would be to make a homebridge UI backup, install the new version, then restore the homebridge UI backup. PS Please don't do this to your primary instance of Homebridge, in case it breaks things. |
For what it's worth, 18.15.0 is now available through the official Synology package (before it was 18.12) and the instructions posted above allow Node to be upgraded seamlessly. |
@FezVrasta ☕️ |
After update to 3.0.15 homebridge using again the internal Node.js. Actually v18.16.1 |
@rh295 Tks for testing this, the NodeJs version v18.16.1 was expected as the refreshed package includes that version. I have now this as 3.0.15. The release includes:
|
Hello, I updated from 3.0.9 to 3.0.15 and now homebridge isn't starting anymore. I guess this is the root cause: /var/packages/homebridge/target/app/bin$ ./node could it be that an incompatible binary was installed? My DSM is 7.1.1 on DS415play as a workaround, I use the node.js from Synology. |
The changes suggested here are included with the release 3.0.17 |
Thanks @NorthernMan54 and FWIW I just did a "manual install" of 3.0.17 and it worked great, including getting your homebridge-tcc back up and running for me: NorthernMan54/homebridge-tcc#134 |
When I updated to Homebridge v3.0.17 I was still left with node.js v18.15.0 rather than the more recent v18.16.1 LTS. Not sure why. ☕️ |
If I understand correctly, the official Node.js v18 Synology package is simply a dependency so it may be a while before anyone goes past v18.15... |
@RobbieTT @devinreams When we based the package off of NodeJS 18.16.1 we found that people with older DSM releases had issues due to missing LIBC libraries needed by that version of NodeJS. To resolve the issue we switched to the Synology supplied NodeJS 18.15. So for the near future we are dependent on Synology updating the NodeJS package. |
@NorthernMan54 Thanks for the explanation, very helpful; you are a gentleman. 👍 ☕️ |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Synology has released Nodejs_v20, which can be upgraded. |
Update:after upgrade the NodeJs v18 package,the homebridge shows it uses v18.15.0
First of all, you need to log in to Synology with the root account SSH, and then switch the directory to /var/packages/homebridge/target/app
cd /var/packages/homebridge/target/app
Then back up and edit the source.sh file.
cp source.sh source.sh.bak
vi source.sh
Modify two positions
NODE_BIN_PATH modified to
NODE_BIN_PATH=”/var/packages/Node.js_v18/target/usr/local/bin“
export HB_NODE_EXEC_PATH modified to
export HB_SERVICE_NODE_EXEC_PATH=”/var/packages/Node.js_v18/target/usr/local/bin/node“
Just save it and restart the package.
The text was updated successfully, but these errors were encountered: