Score:1

auto start nodejs app

et flag

I want to run the command node /home/makerio/Projects/red.js when my computer boots. I added the command to startup apps but it gave me an error that indicates that for some reson, it was running an older version of nodejs

Score:1
in flag

An alternative solution would be to use pm2.

Quoting from its README

PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks

Basically it starts and manages the node process, at boot time or when the node process/app exists/breaks

# Installing pm2    
npm install -g pm2 # may require sudo

# Starting the app
pm2 start ~/Projects/red.js
pm2 save    # saves the running processes
            # if not saved, pm2 will forget
            # the running apps on next boot


# check status 
pm2 list

# IMPORTANT: If you want pm2 to start on system boot
pm2 startup # starts pm2 on computer boot


As for having an outdated node version, many guides exist such as this one

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.