Cannot find module 'dmg-license'
See original GitHub issue- Version: 22.11.3
- Electron Version: 12.0.5
- Target: windows, macos, linux
⨯ Cannot find module 'dmg-license'
Require stack:
- /home/justin/Projects/xplorer/node_modules/dmg-builder/out/dmgLicense.js
- /home/justin/Projects/xplorer/node_modules/dmg-builder/out/dmg.js
- /home/justin/Projects/xplorer/node_modules/dmg-builder/out/dmgUtil.js
- /home/justin/Projects/xplorer/node_modules/app-builder-lib/out/macPackager.js
- /home/justin/Projects/xplorer/node_modules/app-builder-lib/out/packager.js
- /home/justin/Projects/xplorer/node_modules/app-builder-lib/out/index.js
- /home/justin/Projects/xplorer/node_modules/electron-builder/out/builder.js
- /home/justin/Projects/xplorer/node_modules/electron-builder/out/cli/cli.js
- /home/justin/Projects/xplorer/node_modules/electron-builder/cli.js failedTask=build stackTrace=Error: Cannot find module 'dmg-license'
Require stack:
- /home/justin/Projects/xplorer/node_modules/dmg-builder/out/dmgLicense.js
- /home/justin/Projects/xplorer/node_modules/dmg-builder/out/dmg.js
- /home/justin/Projects/xplorer/node_modules/dmg-builder/out/dmgUtil.js
- /home/justin/Projects/xplorer/node_modules/app-builder-lib/out/macPackager.js
- /home/justin/Projects/xplorer/node_modules/app-builder-lib/out/packager.js
- /home/justin/Projects/xplorer/node_modules/app-builder-lib/out/index.js
- /home/justin/Projects/xplorer/node_modules/electron-builder/out/builder.js
- /home/justin/Projects/xplorer/node_modules/electron-builder/out/cli/cli.js
- /home/justin/Projects/xplorer/node_modules/electron-builder/cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
at Function.Module._load (internal/modules/cjs/loader.js:667:27)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/justin/Projects/xplorer/node_modules/dmg-builder/src/dmgLicense.ts:7:1)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.<anonymous> (/home/justin/Projects/xplorer/node_modules/dmg-builder/src/dmg.ts:13:1)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
The version works were v20.31.2.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:10
Top Results From Across the Web
electron-builder error: Cannot find module 'dmg-license'
I am looking for a simple way to build an electron app for macOS, from a linux machine. Unfortunately, the electron-builder -m command...
Read more >dmg-license is an optional dependency, so building fails ...
Cannot find module 'dmg-license'. After inspecting the package.json of electron-builder/packages/dmg-builder I found dmg-license to be ...
Read more >dmg-license - npm
Generate license agreements for macOS .dmg files. ... Start using dmg-license in your project by running `npm i dmg-license`.
Read more >electron-builder failing in macOS : r/electronjs - Reddit
Hello, I am having trouble building a production build for my electron app using electron-builder in macOS with a dmg target.
Read more >DMG - electron-builder
To add license to DMG, create file license_LANG_CODE.txt in the build resources. Multiple license files in different languages are supported — use lang...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Oomph, you’re compiling on an M1? Can you double check that
dmg-license
is present in your node_modules? The module should be found, it’s listed in electron-builder’s dependencies as well https://github.com/electron-userland/electron-builder/blob/c623279a31d3d203ad1f150d83905a7e1f58a731/package.json#L39-L41 https://github.com/electron-userland/electron-builder/blob/c623279a31d3d203ad1f150d83905a7e1f58a731/packages/dmg-builder/package.json#L23-L25 IIRC it’s marked optional in the dmg-builder package.json because it only works on mac