Ubuntu 23 / npm install issues

Ok so no matter what I do npm install fails

Im on Ubuntu 23 (Lunar) which doesn’t support the node14 setup script so I thought I would just install node 14 through nvm which was fine but, half the time npm install uses 14 the other half it corrects to 18 idk how but even when it uses 14 I get constant issues with the diskusage module.

Here’s the log because its a debug log it really long, too long for pastebin so I used mediafire.



10805 verbose stack Error: diskusage@1.1.3 install: `node-gyp rebuild`
10805 verbose stack spawn ENOENT
10805 verbose stack     at ChildProcess.<anonymous> (/root/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:48:18)
10805 verbose stack     at ChildProcess.emit (events.js:400:28)
10805 verbose stack     at maybeClose (internal/child_process.js:1088:16)
10805 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:296:5)
10806 verbose pkgid diskusage@1.1.3
10807 verbose cwd /usr/games/minecraft
10808 verbose Linux 6.2.0-20-generic
10809 verbose argv "/root/.nvm/versions/node/v14.21.3/bin/node" "/root/.nvm/versions/node/v14.21.3/bin/npm" "install"
10810 verbose node v14.21.3
10811 verbose npm  v6.14.18
10812 error code ELIFECYCLE
10813 error syscall spawn
10814 error file sh
10815 error errno ENOENT
10816 error diskusage@1.1.3 install: `node-gyp rebuild`
10816 error spawn ENOENT
10817 error Failed at the diskusage@1.1.3 install script.
10817 error This is probably not a problem with npm. There is likely additional logging output above.
10818 verbose exit [ 1, true ]

Just use Ubuntu 20 and make sure you are using sudo.

Alright I will try 22 first though as that’s worked in the past for me