electron.builder 在windows 平台上报错

来源:6-3 在 macOS 平台打包程序

qq_Q先生_0

2020-01-16 14:26

⨯ Cannot compute electron version from installed node modules - none of the possible electron modules are installed and version ("^7.1.7") is not fixed in project.


配置文件

"devDependencies": {

    "electron": "^7.1.7",

    "electron-builder": "^22.2.0",

    "electron-debug": "^2.0.0",

    "electron-devtools-installer": "^2.2.4",

    "nodemon": "^2.0.2"

  },

  "author": "qht",

  "license": "ISC",

  "scripts": {

    "start": "electron .",

    "dist": "electron-builder"

  },

  "build": {

    "productName": "qhtMusicPlayer",

    "appId": "qht.electron.music.player",

    "copyright": "cp2088",

    "directories": {

      "output": "build",

      "app": "./"

    },

    "nsis": {

      "oneClick": false,

      "allowElevation": true,

      "allowToChangeInstallationDirectory": true,

      "installerIcon": "ioc/f7.ico",

      "uninstallerIcon": "ioc/f7.ico",

      "installerHeaderIcon": "ioc/f7.ico",

      "createDesktopShortcut": true,

      "createStartMenuShortcut": true

    },

    "win": {

      "icon": "ioc/f7.ico",

      "target": [

        "nsis",

        "zip"

      ],

      "artifactName": "简单播放器"

    }

  }



写回答 关注

1回答

  • Subong
    2020-12-14 20:22:24

    大哥,有解决了吗,我也遇到了

Electron开发本地音乐播放器

跨平台开发框架Electron,一次编写多个系统使用

4410 学习 · 53 问题

查看课程

相似问题