电子锻造使knex生成后出现问题

时间:2019-07-12 21:32:58

标签: electron knex.js electron-packager electron-forge

运行electron-forge make可以正常工作,它可以生成应用程序的输出,但是在捆绑中定位knex似乎有问题。我可以使用npm start在本地运行它。我在knex和电子伪造回购上都遵循多条线程,只是停留在其他尝试上。查找我包含的其他软件包没有任何问题。

这是我尝试启动“自制”应用程序时收到的错误。

enter image description here

还有我的package.json

"config": {
    "forge": {
      "electronPackagerConfig": {
        "icon": "src/assets/icons/mac/app.icns"
      },
      "makers": [
        {
          "name": "@electron-forge/maker-squirrel",
          "config": {
            "name": "productmigrate"
          }
        },
        {
          "name": "@electron-forge/maker-zip",
          "platforms": [
            "darwin"
          ]
        },
        {
          "name": "@electron-forge/maker-deb",
          "config": {}
        },
        {
          "name": "@electron-forge/maker-rpm",
          "config": {}
        }
      ],
      "plugins": [
        [
          "@electron-forge/plugin-webpack",
          {
            "mainConfig": "./webpack.main.config.js",
            "renderer": {
              "config": "./webpack.renderer.config.js",
              "entryPoints": [
                {
                  "html": "./src/views/mainWindow.html",
                  "js": "./src/renderers/mainWindow.js",
                  "name": "main_window"
                },
                {
                  "html": "./src/views/dbSettingsWindow.html",
                  "js": "./src/renderers/dbSettingsWindow.js",
                  "name": "db_window"
                }
              ]
            }
          }
        ]
      ]
    }
  },
  "dependencies": {
    "@fortawesome/fontawesome-free": "^5.9.0",
    "aws-sdk": "^2.490.0",
    "bootstrap": "^3.4.1",
    "electron-json-storage": "^4.1.6",
    "electron-squirrel-startup": "^1.0.0",
    "jquery": "^3.4.1",
    "knex": "^0.16.5",
    "mysql": "^2.17.1"
  },
  "devDependencies": {
    "@electron-forge/cli": "^6.0.0-beta.39",
    "@electron-forge/maker-deb": "^6.0.0-beta.39",
    "@electron-forge/maker-rpm": "^6.0.0-beta.39",
    "@electron-forge/maker-squirrel": "^6.0.0-beta.39",
    "@electron-forge/maker-zip": "^6.0.0-beta.39",
    "mini-css-extract-plugin": "^0.4.5",
    "@electron-forge/plugin-webpack": "^6.0.0-beta.39",
    "@marshallofsound/webpack-asset-relocator-loader": "^0.5.0",
    "copy-webpack-plugin": "^4.6.0",
    "electron": "5.0.6",
    "node-loader": "^0.6.0",
    "file-loader": "^2.0.0",
    "css-loader": "^1.0.1",
    "style-loader": "^0.23.1"
  }

0 个答案:

没有答案