When I do /usr/bin/node /root/twitch/dakbot/bot.js
it gives me an error about a module.
It seems whatever dependency that one of my requires
uses is incompatible with an old version of node. So I did sudo npm install -g n
and sudo n latest
.
Now Im on node 16.16.0 on ubuntu 22.04 LTS.
Now when I do node /root/twitch/dakbot/bot.js
it runs fine without error. But when I try to do /usr/bin/node /root/twitch/dakbot/bot.js
or /usr/bin/nodejs /root/twitch/dakbot/bot.js
it gives me the same error it was giving originally.
Why doesnt /usr/bin/node
or /usr/bin/nodejs
use the correct version of node but node /root/twitch/dakbot/bot.js
does? I’m trying to set up supervisord to keep 3 different node scripts running but I cant get them to start because of this.