npm run dist 直接报错
来源:6-3 在MacOS平台打包程序

小岭
2019-08-09
‘build’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-electron@1.0.0 dist: build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-electron@1.0.0 dist script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! D:\node\node_cache_logs\2019-08-09T08_15_05_834Z-debug.log
{
“name”: “my-electron”,
“version”: “1.0.0”,
“description”: “my music”,
“main”: “main.js”,
“scripts”: {
“start”: “nodemon --watch main.js --exec electron .”,
“dist”: “build”
},
“build”: {
“appId”: “myElectron”,
“mac”: {
“category”: “public.app-category.productivity”
},
“linux”: {
“target”: [
“deb”,
“AppImage”
]
},
“dmg”: {
“background”: “build/appdmg.png”,
“icon”: “build/icon.icns”,
“iconSize”: 100,
“contents”: [
{
“x”: 380,
“y”: 280,
“type”: “link”,
“path”: “/Applications”
},
{
“x”: 110,
“y”: 280,
“type”: “file”
}
],
“window”: {
“width”: 500,
“height”: 500
}
},
“win”: {
“target”: “squirrel”,
“icon”: “build/icon.ico”
}
},
“keywords”: [
“Electron”
],
“author”: “GuLinLing”,
“devDependencies”: {
“electron”: “^4.0.7”,
“electron-builder”: “^21.2.0”,
“nodemon”: “^1.19.1”
},
“dependencies”: {
“bootstrap”: “^4.3.1”,
“electron-store”: “^4.0.0”,
“font-awesome”: “^4.7.0”,
“uuid”: “^3.3.2”
}
}
1回答
-
闭麦i
2019-09-05
dist后面要执行的内容改成electron-builder,也就是build -> electron-builder
20
相似问题