System (Mac, Windows 7/8/10, Linux) / 操作系统
Debian 11 arm64
SwitchHosts! Version / SwitchHosts! 版本
最新源码
Description / 描述
在 scripts/make.js
中加入打包 arm64 格式的 deb,然后执行 npm install && npm run build && npm run make
。提示缺少 dmg-license
模块,但这个模块无法在 Linux 中安装。
> make
> node scripts/make.js "linux"
-> beforeMake...
-> make...
• electron-builder version=22.14.13 os=5.10.0-10-arm64
• loaded configuration file=package.json ("build" field)
• writing effective config file=dist/builder-effective-config.yaml
Error: Cannot find module 'dmg-license'
Require stack:
- /home/sjy/SwitchHosts/node_modules/dmg-builder/out/dmgLicense.js
- /home/sjy/SwitchHosts/node_modules/dmg-builder/out/dmg.js
- /home/sjy/SwitchHosts/node_modules/dmg-builder/out/dmgUtil.js
- /home/sjy/SwitchHosts/node_modules/app-builder-lib/out/macPackager.js
- /home/sjy/SwitchHosts/node_modules/app-builder-lib/out/packager.js
- /home/sjy/SwitchHosts/node_modules/app-builder-lib/out/index.js
- /home/sjy/SwitchHosts/node_modules/electron-builder/out/builder.js
- /home/sjy/SwitchHosts/node_modules/electron-builder/out/index.js
- /home/sjy/SwitchHosts/scripts/make.js
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
at Function.Module._load (node:internal/modules/cjs/loader:778:27)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/sjy/SwitchHosts/node_modules/dmg-builder/src/dmgLicense.ts:7:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/sjy/SwitchHosts/node_modules/dmg-builder/src/dmg.ts:13:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/home/sjy/SwitchHosts/node_modules/dmg-builder/src/dmgUtil.ts:6:1)
at Module._compile (node:internal/modules/cjs/loader:1103:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
at Module.load (node:internal/modules/cjs/loader:981:32) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/sjy/SwitchHosts/node_modules/dmg-builder/out/dmgLicense.js',
'/home/sjy/SwitchHosts/node_modules/dmg-builder/out/dmg.js',
'/home/sjy/SwitchHosts/node_modules/dmg-builder/out/dmgUtil.js',
'/home/sjy/SwitchHosts/node_modules/app-builder-lib/out/macPackager.js',
'/home/sjy/SwitchHosts/node_modules/app-builder-lib/out/packager.js',
'/home/sjy/SwitchHosts/node_modules/app-builder-lib/out/index.js',
'/home/sjy/SwitchHosts/node_modules/electron-builder/out/builder.js',
'/home/sjy/SwitchHosts/node_modules/electron-builder/out/index.js',
'/home/sjy/SwitchHosts/scripts/make.js'
]
}
How to reproduce / 重现步骤
在 scripts/make.js
中加入打包 arm64 格式的 deb,然后执行 npm install && npm run build && npm run make
。
1条答案
按热度按时间ha5z0ras1#
dmg-license
应该是在 macOS 下打包用的,把和 mac、dmg 相关的代码去掉试试?