Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
266 views
in Technique[技术] by (71.8m points)

javascript - The console log keeps giving me an error, how do i fix this?

I use replit but the console log keeps telling me that a script is missing everytime i try to run it since i use replit but in the replit file it says run = "npm start" and everytime i run that it says the script "start" is missing here you can see the pic where it gives the error

question from:https://stackoverflow.com/questions/65902931/the-console-log-keeps-giving-me-an-error-how-do-i-fix-this

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should edit your package.json file and add the following:

{
    "scripts": {
        "start": "node index.js"
    }
}

(only add the scripts, don't remove the current content of the file)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...