4

I tried to use npm start to start my application. So I added the following line in my package.json file:

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

however, when I used npm start, I met with this problem: enter image description here

but when I used node app.js, it worked. So what's the problem?

3
  • Can you include the content of your package.json for the application name? Commented Oct 18, 2016 at 23:44
  • Can you post the screenshot of the errors at the top of your screenshot? Commented Oct 18, 2016 at 23:53
  • Solved, I forgot to open my database. Your advice is really helpful, because the problem lies in the top of my screen shot, which I didn't include in the image, thank you! Commented Oct 19, 2016 at 3:26

1 Answer 1

4

Use the command npm run start instead of npm start.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.