Console doesn`t show the changes

Problem description:
I open a file, write new code in it or change it, click on “Run” but the console always shows an old state from yesterday.

Expected behavior:
Shows always my current script.

Actual behavior:
Changes are not accepted.

Steps to reproduce:

Bug appears at this link:

Browser/OS/Device:
Firefox and Chrome, Win10

Can you please include a link to your code? We won’t be able to help you without it.

Hi OmegaOrbitals2,
sorry, I´m completely new here. I didn´t know that I can send you a link to my files.
Lets try, I hope it helps:
https://replit.com/@TomJay6/Test01

1 Like

What file did you want to run? It will only run index.js by default.

When you create a NodeJS repl, theindex.js find is configured to be run when the ‘run’ button is clicked. If you’re expecting the code in the other fine in your repl to be run, it won’t be unless you explicitly configure the .replit to run it. You can move this code into the index.js file and you should see the results you expect.

1 Like

Ok, so I open Test01.js, I expect to run it, but in reality index.js runs. That´s strange for me.
How do I

explicitly configure the .replit to run it

?
I don´t want to move this code in another file.
That are my first steps, my first examples, but later I want to handle different files.

Go to the three dots on the left-side file menu. Click on “Show hidden files”. You will see this

Go to .replit, and change the entrypoint variable to Test01.js.

1 Like

Thank you very much, it runs.
But I still find it strange and a bit complicated, when I just want to test some things in different files. Ok, I know how to do, thank you again.

1 Like

The entrypoint is just the file that opens if no file is open when you enter Replit’s editor workspace. To change the file run, you need to change the run command, which is by default on line 89 (the very bottom, literally the last line) of .replit. It should look like this by default: run = ["sh", "-c", "node index.js"]. Changing "node index.js" to node Test01.js should make the Test01.js file run.

1 Like

I would recommend just doing CTRL/CMD + F/H (both F and H work, technically H should be different and should be the one you want, but from experience it does the same thing as F). You can then click the > icon on the left on the input and you will see another input. In the first input put index.js, in the second, `Test01.js, then click replace all and that should fix everything for you.

Find and replace

:smile:

entrypoint works for me though…

https://replit.com/@OmegaOrbitals2/QuintessentialFatherlyEvent