最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python 3.x - How can I fix the electron-build for my .dmp app - Stack Overflow

programmeradmin5浏览0评论

When I run the npm run dist-mac it does not create the .dmp files and I am getting this error. What do I have to do to get this to succeed? I have been working on this with Grok and chatGPT, but so far they have not been helpful.

MacBookPro:expense_tracker denisputnam$ npm run dist-mac

> [email protected] dist-mac
> electron-builder --mac --x64 --arm64

  • electron-builder  version=25.1.8 os=24.3.0
  • loaded configuration  file=package.json ("build" field)
  • writing effective config  file=dist/builder-effective-config.yaml
  • executing @electron/rebuild  electronVersion=35.0.2 arch=x64 buildFromSource=false appDir=./
  • installing native dependencies  arch=x64
  • completed installing native dependencies
  • packaging       platform=darwin arch=x64 electron=35.0.2 appOutDir=dist/mac
  • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
  • asar usage is disabled — this is strongly not recommended  solution=enable asar and use asarUnpack to unpack files that must be externally available
  ⨯ /Users/denisputnam/git/expense_tracker not a file
MacBookPro:expense_tracker denisputnam$ 

Grok is of no help. Can someone tell what is wrong?

This is my package.json file.

{
  "name": "expense-tracker-electron",
  "version": "1.0.0",
  "description": "An expense tracking application using Electron and Django.",
  "author": {
    "name": "Denis Putnam",
    "email": "[email protected]"
  },
  "main": "electron-app/main.js",
  "scripts": {
    "start": "electron .",
    "build": "electron-builder",
    "postinstall": "electron-builder install-app-deps",
    "dist-mac": "electron-builder --mac --x64 --arm64",
    "dist-mac-universal": "electron-builder --mac --universal",
    "dist-win": "electron-builder --win --x64 --arm64",
    "dist-linux": "electron-builder --linux",
    "dist-all": "electron-builder --mac --win --linux --x64 --arm64"
  },
  "dependencies": {
    "wait-on": "^8.0.2"
  },
  "devDependencies": {
    "@electron/packager": "^18.3.6",
    "electron": "^35.0.2",
    "electron-builder": "^25.1.8"
  },
  "build": {
    "asar": false,
    "files": [
      "electron-app/main.js",
      "electron-app/package.json",
      "electron-app/node_modules/**/*",
      "manage.py",
      "expense_tracker/**/*",
      "apps/**/*",
      "static/**/*",
      "templates/**/*",
      ".env",
      "requirements.txt",
      "db.sqlite3"
    ],
    "extraResources": [
      {
        "from": "venv",
        "to": "venv",
        "filter": [
          "**/*"
        ]
      },
      {
        "from": "scripts",
        "to": "scripts",
        "filter": [
          "setup_venv.sh"
        ]
      },
      {
        "from": "db.sqlite3",
        "to": "db.sqlite3"
      }
    ],
    "directories": {
      "buildResources": "build"
    },
    "mac": {
      "category": "public.app-category.finance",
      "icon": "icons/icon.icns",
      "hardenedRuntime": true,
      "gatekeeperAssess": false,
      "entitlements": "/Users/denisputnam/git/expense_tracker/build/entitlements.mac.plist",
      "entitlementsInherit": "/Users/denisputnam/git/expense_tracker/build/entitlements.mac.plist",
      "sign": false,
      "identity": "Developer ID Application: Denis Putnam (2368694WQF)",
      "notarize": {
        "teamId": "2368694WQF"
      },
      "target": [
        {
          "target": "dmg",
          "arch": [
            "x64",
            "arm64"
          ]
        },
        {
          "target": "zip",
          "arch": [
            "x64",
            "arm64"
          ]
        }
      ]
    },
    "win": {
      "target": [
        {
          "target": "nsis",
          "arch": [
            "x64",
            "arm64"
          ]
        },
        {
          "target": "zip",
          "arch": [
            "x64",
            "arm64"
          ]
        }
      ],
      "icon": "icons/icon.ico",
      "artifactName": "${productName}-win-${arch}.${ext}"
    },
    "linux": {
      "target": [
        {
          "target": "AppImage",
          "arch": [
            "x64",
            "arm64"
          ]
        },
        {
          "target": "deb",
          "arch": [
            "x64",
            "arm64"
          ]
        },
        {
          "target": "rpm",
          "arch": [
            "x64",
            "arm64"
          ]
        }
      ],
      "icon": "icons/icon.png",
      "category": "Finance",
      "artifactName": "${productName}-linux-${arch}.${ext}",
      "maintainer": "Denis Putnam <[email protected]>"
    }
  }
}

发布评论

评论列表(0)

  1. 暂无评论