Pro Poop
Pro Poop

Reputation: 456

Electron NPM ERR! Missing Script: Start

I know this has been asked before, but that question did not help me at all! So I am trying to make an Electron app using its tutorial, and whenever I try and run my code, this error pops up:

npm ERR! missing script: start

Here is my package.json:

{
"name": "my-electron-app",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "electron ."
    },
    "keywords": [],
    "author": "",
    "license": "ISC"
}

So what am I doing wrong?

Upvotes: 1

Views: 1565

Answers (2)

Pro Poop
Pro Poop

Reputation: 456

Ok for those of you who had a similar problem, try using a different shell! I was using WSL and when I tried Windows command prompt everything worked just fine.

Upvotes: 1

The Otterlord
The Otterlord

Reputation: 2195

Strange. I can't think of many reasons why this is happening. I have a few ideas that may help.

  1. Check you are in the correct folder to run the command
  2. Attempt npm run start instead

If neither of these work, there may be something else that is missing

Upvotes: 1

Related Questions