SK not Updating

I tried to update to 2.13.4 and could not get SK to update. I tried to update from 2.13.3 to 2.13.5 an still no luck. I have made sure the RPi is updated and follwed the update instructions on the SK Updating Your Installations page. Node version is 18.20.7. Any ideas?
62 Replies
Scott Bender
Scott Bender2w ago
Check the server logs for errors?
kmon6369
kmon6369OP2w ago
Here are the errors wehen I run the update: Mar 25 09:43:22 sh: 1: mpstat: not found Mar 25 09:43:43 stderr: npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. Mar 25 09:43:43 stderr: npm warn deprecated [email protected]: This package is deprecated. Use the optional chaining (?.) operator instead. Mar 25 09:43:43 stderr: npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported Mar 25 09:43:43 stderr: npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. Mar 25 09:43:44 stderr: npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported Mar 25 09:43:45 stderr: npm warn deprecated [email protected]: This package is no longer supported.
Scott Bender
Scott Bender2w ago
I think you updated your nodejs
kmon6369
kmon6369OP2w ago
I will see if I can get it back to an earlier version
Scott Bender
Scott Bender2w ago
No. That’s ok. v18 is needed
kmon6369
kmon6369OP2w ago
thank you Appears to be pointing at the correct location https://github.com/SignalK/signalk-server/wiki/FAQ:-Frequently-Asked-Questions#server-update-not-updating-the-server-version /usr/local/lib/node_modules/signalk-server/bin/signalk-server -c /home/Pi/.signalk $*
Scott Bender
Scott Bender2w ago
And if you type ‘which node’ at the command line?
kmon6369
kmon6369OP2w ago
/usr/local/bin/node
Scott Bender
Scott Bender2w ago
Ok. So that’s not the issue. You are restarting sk after updating?
kmon6369
kmon6369OP2w ago
Yes. Each time I have tried. I have also tried restart and reboot.
Scott Bender
Scott Bender2w ago
Try updating from the command line sudo npm install -g signalk-server
kmon6369
kmon6369OP2w ago
will do. Ran it and restarted and still not updated. Pi@SVLDMPi:~ $ sudo npm install -g signalk-server npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated [email protected]: This package is deprecated. Use the optional chaining (?.) operator instead. npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported npm warn deprecated [email protected]: This package is deprecated. Use require('node:util').isDeepStrictEqual instead. npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported npm warn deprecated [email protected]: This package is no longer supported. changed 695 packages in 3m 120 packages are looking for funding run npm fund for details
Scott Bender
Scott Bender2w ago
‘which npm’
kmon6369
kmon6369OP2w ago
/usr/local/bin/npm
Scott Bender
Scott Bender2w ago
grep version /usr/local/lib/node_modules/signalk-server/package.json
kmon6369
kmon6369OP2w ago
"version": "2.13.3", "compare-versions": "^3.0.1",
Scott Bender
Scott Bender2w ago
npm view signalk-server version
kmon6369
kmon6369OP2w ago
2.13.5
Scott Bender
Scott Bender2w ago
really strange!
kmon6369
kmon6369OP2w ago
interesting. just not updating what is shows as the current vesion in SK
Scott Bender
Scott Bender2w ago
no yu still have 2.13.3
kmon6369
kmon6369OP2w ago
oh
Scott Bender
Scott Bender2w ago
"npm view signalk-server version" shows what version is available
kmon6369
kmon6369OP2w ago
got it
Scott Bender
Scott Bender2w ago
we can try something a littile more destructive...
kmon6369
kmon6369OP2w ago
ok
Scott Bender
Scott Bender2w ago
"mv /usr/local/lib/node_modules/signalk-server /usr/local/lib/node_modules/signalk-server.old" forgot "sudo" "sudo mv /usr/local/lib/node_modules/signalk-server /usr/local/lib/node_modules/signalk-server.old" "sudo npm install -g signalk-server" "grep version /usr/local/lib/node_modules/signalk-server/package.json"
kmon6369
kmon6369OP2w ago
in progress grep: /usr/local/lib/node_modules/signalk-server/package.json: No such file or directory
Scott Bender
Scott Bender2w ago
so where the heck is it puting it? ls /usr/lib/node_modules/signalk-server
kmon6369
kmon6369OP2w ago
ls: cannot access '/usr/lib/node_modules/signalk-server': No such file or directory i checked and that directory does not exist. There is a singalk-server.old directory
Scott Bender
Scott Bender2w ago
seems like there is something really wrong with npm I've never seen this behaviour before
kmon6369
kmon6369OP2w ago
tiem for a reinstall? time for me to reinstall? SK is gone now. Wont start
Scott Bender
Scott Bender2w ago
you can rename that .old directory back sudo mv /usr/local/lib/node_modules/signalk-server.old /usr/local/lib/node_modules/signalk-server I would reinstall nodejs (it comes with npm) and ideas @Teppo Kurki ?
kmon6369
kmon6369OP2w ago
its back
Scott Bender
Scott Bender2w ago
nodejs needs to v18 or v20
kmon6369
kmon6369OP2w ago
i will update and let you know
PaddyB
PaddyB2w ago
not sure if it's relevant but on openplotter on pi4 i get.. pi@openplotter:~ $ which npm /usr/bin/npm pi@openplotter:~ $ grep version /usr/local/lib/node_modules/signalk-server/package.json grep: /usr/local/lib/node_modules/signalk-server/package.json: No such file or directory pi@openplotter:~ $ grep version /usr/lib/node_modules/signalk-server/package.json "version": "2.13.5", "compare-versions": "^3.0.1", pi@openplotter:~ $
kmon6369
kmon6369OP2w ago
i updated and now have node 20.19.0 rebooted, ran the update, restarted SK and the update did not work.
Scott Bender
Scott Bender2w ago
“node -v” shows v20?
kmon6369
kmon6369OP2w ago
v20.19.0
Teppo Kurki
Teppo Kurki2w ago
"ran the update" probably meant sudo npm install -g signalk-server ? or from the ui? what does npm list -g signalk-server say? and npm config list
kmon6369
kmon6369OP2w ago
/home/Pi/.nvm/versions/node/v20.19.0/lib └── (empty) ; node bin location = /home/Pi/.nvm/versions/node/v20.19.0/bin/node ; node version = v20.19.0 ; npm local prefix = /home/Pi ; npm version = 10.8.2 ; cwd = /home/Pi ; HOME = /home/Pi ; Run npm config ls -l to show all defaults.
Teppo Kurki
Teppo Kurki2w ago
so, you are using nvm, not a node installed with the package manager
kmon6369
kmon6369OP2w ago
yes but glad to do it a different way if that is better and have tried the update to SK both ways, UI and command line. Same result.
Teppo Kurki
Teppo Kurki2w ago
if you run nvm deactivate first can you still start node?
kmon6369
kmon6369OP2w ago
ran node and it shows node.js v18.20.7
Teppo Kurki
Teppo Kurki2w ago
it sounds like you have a regular node install (or have had it at some point) that places stuff in /usr/lib/node_modules (that you tried renaming earlier with Scott) but now you have nvm managed node that probably places -g global installs under /home/Pi/.nvm/versions/node/v20.19.0/lib what does npm config list say now?
kmon6369
kmon6369OP2w ago
; node bin location = /usr/local/lib/node_modules/node/lib/node_modules/node/bin/node ; node version = v18.20.7 ; npm local prefix = /home/Pi ; npm version = 10.9.2 ; cwd = /home/Pi ; HOME = /home/Pi ; Run npm config ls -l to show all defaults. my apoligies to both you and Scott for being a nuisance
Teppo Kurki
Teppo Kurki2w ago
node bin location is rather interesting, but what about npm list -g signalk-server now?
kmon6369
kmon6369OP2w ago
/usr/local/lib/node_modules/node/lib/node_modules/node/lib └── [email protected]
Teppo Kurki
Teppo Kurki2w ago
now, i would have expected that to say 2.13.3
Teppo Kurki
Teppo Kurki2w ago
if i were you i would probably get rid of nvm, see https://www.linode.com/docs/guides/how-to-install-use-node-version-manager-nvm/#nvm-uninstall-steps and remove everything under /home/Pi/.nvm/ that eliminates one level of re/misdirection
Linode Guides & Tutorials
How to Install and Use NVM (Node Version Manager)
Learn to use NVM to install Node.js on your computer. This guide shows you how to install and use NVM and how to install the LTS version of Node.js.
Teppo Kurki
Teppo Kurki2w ago
then reboot and see where you are at. if things don't work you can proceed to uninstall and reinstall nodejs and install sk with sudo npm install -g signalk-server
kmon6369
kmon6369OP2w ago
will post when I get that done unistalled nvm /usr/local/lib/node_modules/node/lib/node_modules/node/lib └── [email protected] ; node bin location = /usr/local/lib/node_modules/node/lib/node_modules/node/bin/node ; node version = v18.20.7 ; npm local prefix = /home/Pi ; npm version = 10.9.2 ; cwd = /home/Pi ; HOME = /home/Pi ; Run npm config ls -l to show all defaults.
Teppo Kurki
Teppo Kurki2w ago
i think your node environment is wonky because you have installed an npm module with name node that is a different thing from the actual nodejs that is the program that signalk-server runs under - and this is why there is this node_modules/node/lib/node_modules/node/lib part there again if I were you i'd remove /usr/local/lib/node_modules/node and everything under it and reinstall nodejs v20 i think npm list -g signalk-server should give you
/usr/local/lib
/usr/local/lib
and not include the node_modules/lib/node... thing
kmon6369
kmon6369OP2w ago
ok I will get back to you when I get that done
Teppo Kurki
Teppo Kurki2w ago
😓 😆 i think your system has the most obfuscation layers i've encountered: nvm and TodayILearned there is an npm module called node....
kmon6369
kmon6369OP2w ago
node -v Installed v20 and now have other issues. Seems like it would be best to remove several things and reinstall. Let me know what I am missing - Remove NVM, Remove Node, Remove Node JS, Remove SignalK - Then reinstall NodeJS V18 or V20 and install SignalK. I should be able to back up my KIP and SignalK (with Plugins) and restore those when the reinstalltion is complete.
Scott Bender
Scott Bender2w ago
At this point, it would easier start with a fresh os?
kmon6369
kmon6369OP2w ago
Was hoping to avoid that but that is probably best.
Teppo Kurki
Teppo Kurki2w ago
Keep your .signalk except for node_modules Carry them over to the new system and then reinstall plugins after server is up ..or you could switch running sk in docker in current system, but we don’t have that documented

Did you find this page helpful?