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?
Strange. I can't think of many reasons why this is happening. I have a few ideas that may help.
npm run start
insteadIf neither of these work, there may be something else that is missing
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.