Replit node-express boilerplate not working

My browser is google chrome. The repl does not work from the get-go. The error message shown in the console is as follows:

internal/fs/utils.js:269
    throw err;
    ^

Error: ENOENT: no such file or directory, open '/home/runner/boilerplate-express/index.js'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Object.<anonymous> (/run_dir/interp.js:195:19)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: '/home/runner/boilerplate-express/index.js'
}```

Please help!

still waiting for someone to clarify this for me. Thanks!!

This seems like a broader issue with the repl boilerplates for anything involving Node. I am also using Chrome, and got a similar message while working on the Quality Assurance and Testing with Chai challenges. Out of curiosity, I got the same error again trying to use the Information Security with HelmetJS boilerplate.
Did repl.it change something about directory structures that is breaking the boilerplates? I haven’t figured anything out yet.

How could we bring this to the attention of FCC?

The error i get says there is no index.js, so I am guessing that the one of the modules (fcc something) is dependant on index.js

I just tested a couple of the challenges in the API and microservices sections and was able to get replit working.

Can you please specify which challenge you are working on?

Thanks!

Hello @jwilkins.oboe

I was working on the second course (Basic Node and Express) from the APIs and Microservices certification. Here is the link:

here is my repl.it instance (the one that is not working for me):

I tried the same repl.it instance on firefox, chrome and brave browsers, but was unable to get it working. Here are some details about my browsers and my machine if that matters:

here is what the output looks like:

Hmm… that’s odd.

I was able to fork your project and complete the first challenge.
I am not able to replicate the error message on my end.
This is what I am currently looking at in the replit console.

Maybe one of the other moderators can test it on their end and see if they can replicate the error message.

Good luck!

Ohh… you just modified your post.

Can you try running console.log("Hello World") like the challenge says?

I did. Same result.

Node is looking for an index.js and that’s what the error is. I tried renaming myApp.js to index.js, but that did not solve it either. IDK what to do.

I am stumped. :confused:

I just forked your project again and hit run and I am getting different messages in the console.

I am not really sure what the issue is.

You can create an issue, and make sure to reference this forum post and include screenshots of what you are seeing on your end.

Also, make sure to mention what device you are using (mac, windows, linux)

Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

Good luck!

Hello there,

Unfortunately, this appears to be a bug within Replit. I have only come across this once, in the hundreds of REPLs I have used, and I managed to get around it by creating an index.js file. Every other REPL I have created has worked as expected. So, it might be worth trying to re-clone the GitHub boilerplate (click the our Replit starter project again )

Otherwise, it would be worth it to get in touch with the Replit support.

Hope this helps

I just submitted an issue. Thanks for suggesting!

Hello @Sky020 ,

I have tried recloning it multiple times, but I get the same result. However, when I started a new repl with just Node, it works fine. So i’m guessing that it has something to do with FCC wizardy in that particular setup.

@jwilkins.oboe and @Sky020 ,

Is there an alternative way to pass these assignments? I have a feeling it will be a long time before FCC or Replit solve this issue. Can’t i fork the github repo and provide that link as answers?? I am pretty new so please bear with me. Thanks

Have you tried starting it manually with npm install and then npm start?

You can clone the github repo and then host it on heroku.

I have also seen people use glitch

thanks a lot,I will look into that.

@sanity,

i tried but it did not help. Here is what I got after npm install:

~/boilerplate-express$ npm install
npm WARN fcc-learn-node-with-express@0.1.0 No description
npm WARN fcc-learn-node-with-express@0.1.0 No repository field.
npm WARN fcc-learn-node-with-express@0.1.0 No license field.

up to date in 3.765s
~/boilerplate-express$ 

I really don’t know what to make of it. I think i am going to quit on replit and host my solution on Heroku or Glitch as @jwilkins.oboe suggested.

What about npm start after that?

@sanity
Sorry. I forgot to do that.

It works!!! Thanks a billion buddy.

So does this mean i need to quit using the “RUN” button at the top and instead ctrl+C then npm start every time I make a change?

Again, thanks a lot. It was starting to get frustrating. Also if you could spare a few minutes to explain what this means, that would be awesome.

Generally the “RUN” button should do here exactly this, run npm start (after the initial installation of dependencies). If you take a look at the .replit file, it is a configuration file for replit, defining used language and run command.

Having said that, I don’t know why that is not picked up automatically and needed to be done manually for you, but otherwise it should work the same. Just different way to start/stop.