为了账号安全,请及时绑定邮箱和手机立即绑定

electron.builder 在windows 平台上报错

⨯ 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 回答

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

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

electron.builder 在windows 平台上报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信