在package.json的 scripts 中定义start为字段的命令
"start": "./node_modules/.bin/electron ." 即可解决
添加如下:
{
"name": "App",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "./node_modules/.bin/electron ." //在代码中添加start
,
"test": "echo "Error: no test specified" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
网友评论