Basic Node and Express - Meet the Node console

Tell us what’s happening:

I imported the repo into replit but when I tried running it, it keep complaining about use: command not found and wont log Hello World.

Your project link(s)

Project Link: boilerplate-express - Replit

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Basic Node and Express - Meet the Node console

run button is not configure :
go open the tree dots in files,click on show hidden files,scrol down to .replite
in side of thet file :

modules = ["nodejs-18:v3-20230608-f4cd419"]
hidden = [".config", "package-lock.json"]
run = "Use run command "

channel = "stable-23_05"

language = "nodejs"

run = ["sh", "-c", "Use run command "]
deploymentTarget = "cloudrun"
ignorePorts = false

change this :

run = "Use run command "

in to :

run = "node  myApp.js "

then in here :

run = ["sh", "-c", "Use run command "]

do the same :

run = ["sh", "-c", "node   myApp.js "]

Hope his helps…

it still doesnt work sadly

This topic might help you out.

Happy coding.

here is the bilerplete-template link
boilerplate-expres-Meet the Node console
the button is configure
with npm run start …
fork it if you like…

Hi @zaklina

I don’t think node myApp.Js is correct. Shouldn’t it be node myApp.js?

it is expleind above , you could use

npm run start 

to start the server

Your app should be running from server.js, not myApp.js. Often if you don’t configure the Run command when you initially import the repl, it will try to run from index.js (which in this case does not exist).

In future, ensuring that you configure the Run command when you fork the repl (as per the challenge instructions) should avoid any problems, but you can fix it by making the following edits to the .replit file:

Change entrypoint to server.js.
Ensure that the run command is npm start.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.