尝试打包电子应用程序时为什么会出现errno1?

时间:2020-04-13 00:21:06

标签: node.js electron electron-builder

我已经构建了一个扫雷电子应用程序,我正在尝试将其与电子生成器打包在一起。运行npm run dist时,得到以下输出:

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! minesweeper-native@1.0.0 dist: `electron-builder`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the minesweeper-native@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!     /home/michael/.npm/_logs/2020-04-13T00_16_28_756Z-debug.log

我尝试查看日志,但没有提供任何线索。我对这些东西不是很经验。

这是我的package.json文件:

{
  "name": "minesweeper-native",
  "version": "1.0.0",
  "description": "A classic minesweeper desktop app",
  "repository": "",
  "author": "Michael A. Cook <mcook0775@gmail.com>",
  "license": "MIT",
  "main": "main.js",
  "scripts": {
    "postinstall": "install-app-deps",
    "start": "npm install && electron ./app",
    "pack": "electron-builder --dir",
    "dist": "electron-builder"
  },
  "build": {
    "category": "game",
    "dmg": {
      "contents": [
        {
          "x": 110,
          "y": 150
        },
        {
          "x": 240,
          "y": 150,
          "type": "link",
          "path": "/Applications"
        }
      ]
    },
    "linux": {
      "target": [
        "AppImage",
        "deb"
      ]
    },
    "win": {
      "target": "NSIS",
      "icon": "build/icon.ico"
    }
  },
  "dependencies": {},
  "devDependencies": {
    "electron": "^8.2.1",
    "electron-builder": "^22.4.1"
  }
}

如果有人可以给我一些了解为什么它不起作用的消息,我将非常感激。谢谢。

0 个答案:

没有答案