Ask coding questions

← Back to all posts
boilerplate-mochachai-3
VitorHugo50

This code from FreeCodeCamp started to return this error in a very strange way, was it a bug with the replit?

Voters
VitorHugo50
Comments
hotnewtop
InvisibleOne

replit looks for a starter file to start the script from. By default this is index.js
if there is not an index.js file as the starter file, then you need to create a file called .replit and then you can set which file to run as the starter file.
If for example, your starter file was app.js
you would put run="node app.js" in the .replit file

VitorHugo50

@InvisibleOne
The files already exists: https://github.com/freeCodeCamp/boilerplate-mochachai/blob/main/.replit

But in the file we have run = "npm start" instead of run="npm start"

The change in spaces made it work, strange that this morning it was working and the afternoon it stopped working.

I'm going to upload a pullrequest to the freecodecamp code.