Ask coding questions

← Back to all posts
nodejs wont run
SganOfLegend

Alright so I have this discord bot but it requires me to run it with npm and I don't want to run it witn npm due when i close the app, it just shut downs the bot. Is there any way I can make this run with replit's "run" button

Voters
SganOfLegend
Comments
hotnewtop
Coder100

create a .replit file to configure it to run npm!
https://docs.replit.com/repls/dot-replit#configuring-the-run-button

SganOfLegend

@Coder100 yeah alright so code to power up the bot, I changed it to node bot, after creating a start.split file i typed in
run = "node bot" but it seems like it cancels the running process and puts it back to stop

InvisibleOne


The reason it's not running when you press the run button is this error.

SganOfLegend

@InvisibleOne it perfectly runs when i run it with npm start, im looking for a way to make it run with the repl run button instead of npm start