`AppImage` does not start, misses dependency
See original GitHub issueI wanted to create an AppImage
from sveltekit-electron
. Since I’m on Linux Mint, I changed the
In package.json
, I changed the build:electron
script entry:
"build:electron": "electron-builder -l --config build.config.json",
In build.config.json
, I added
"linux": {
"target": "AppImage"
},
After running pnpm run build
, there’s an *.AppImage
file in dist
. When trying to run that file, an error is printed:
$ dist/Svelte\ Electron-0.0.1.AppImage
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Cannot find module 'jsonfile'
Require stack:
- /tmp/.mount_SvelteKlfyNf/resources/app.asar/node_modules/electron-window-state/index.js
- /tmp/.mount_SvelteKlfyNf/resources/app.asar/src/electron.cjs
-
at Module._resolveFilename (internal/modules/cjs/loader.js:887:15)
at Function.n._resolveFilename (electron/js2c/browser_init.js:257:1128)
at Module._load (internal/modules/cjs/loader.js:732:27)
at Function.f._load (electron/js2c/asar_bundle.js:5:12913)
at Module.require (internal/modules/cjs/loader.js:959:19)
at require (internal/modules/cjs/helpers.js:88:18)
at Object.<anonymous> (/tmp/.mount_SvelteKlfyNf/resources/app.asar/node_modules/electron-window-state/index.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:1078:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1108:10)
at Module.load (internal/modules/cjs/loader.js:935:32)
From there on, the process hangs without opening a window. Because it hangs, I was able to inspect the temporary directory and could confirm there is no module jsonfile
to be found. I did unpack the resources/app.asar
archive as well. In the unpacked *.asar
, in file node_modules/electron-window-state/package.json
there’s a dependency "jsonfile": "^4.0.0"
so one should think the builder should pick this up.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Missing dependency in AppImage: libgconf-2 #1305 - GitHub
Workaround: sudo apt install libgconf2-4 , then the AppImage will run. But it needs to be fixed inside the AppImage.
Read more >Troubleshooting — appimage-builder 1.0.0 documentation
The first thing to check when Appimage is created is the .bundle.yml file. ... then too look for missing packages or undesired external...
Read more >AppImage incompatibility in Ubuntu 22.04 - Joplin Forum
The AppImage distribution (and more generally, all existing AppImage's) are built expecting libfuse2 support. This means that AppImage's will not run on Ubuntu ......
Read more >Appimage application does not find vulkan dependencies
I have an AMD GPU that supports vulkan and it's working fine for other applications but is not working for a particular appimage....
Read more >Common Configuration - electron-builder
If you want to use js file, do not name it electron-builder.js . ... Boolean - Whether to rebuild native dependencies before starting...
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 Free
Top 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
I was able to successfully build the
AppImage
withpnpm
by addingpublic-hoist-pattern=*
to.npmrc
, as pointed out in this issueMakes sense!