Error: Cannot find module '/home/runner/boilerplate-infosec/index.js'

There is no index.js file then why they want it to run


Hello there,

This is a bug that sometimes happens in Replit, when it cannot find a declared entrypoint file, it defaults to index.js.

To fix this, you might need to edit the .replit file to ensure it includes:

run = "npm start"
entrypoint = "server.js"

If you do not see the .replit file, click on the three vertical dots in the Files tab, and select something along the lines of “Show hidden files”.

Hope this helps

but there is no .replit file

did you try to show the hidden files as suggested earlier?

When you first start the boilerplate it should ask you for a config.

If you press the “Done” button it should set it up, if you do not click the button you get that error with a missing index file (at least I do).

As said, you should be able to edit the .replit file as well after the fact.