electron-userland / electron-userland/electron-webpack
Problem with running packed app
- Dominant language
- TypeScript
- Stars
- 902
- Forks
- 168
- PR merge metrics
- No merged PRs in 30d
Description
In developing everything works smoothly. But after packaging and an attempt to run the unpacked app. It also works if I unpack the asar file. I am using 21.1.1 version. I am packaging for windows.
The error:
Uncaught Error: Cannot find module './appSettings'
Require stack:
- C:\Repos\electron-boilerplate\dist\win-unpacked\resources\app.asar\app\mainWindow.html
at Module._resolveFilename (internal/modules/cjs/loader.js:659)
at Function.Module._resolveFilename (C:\Repos\electron-boilerplate\dist\win-unpacked\resources\electron.asar\common\reset-search-paths.js:43)
at Function.Module._load (internal/modules/cjs/loader.js:577)
at Module.require (internal/modules/cjs/loader.js:715)
at require (internal/modules/cjs/helpers.js:14)
at mainWindow.ts:4
This appSettings is my module.
package.json:
"build": {
"appId": "com.example.authority.screen.capture",
"files": [
"app/*",
"node_modules/**/*",
"package.json"
],
"publish": null
},
"electronWebpack": {
"main": {
"sourceDirectory": "app"
},
"renderer": null
},
"productName": "Authority Screen Capture",
"scripts": {
"postinstall": "electron-builder install-app-deps",
"compile": "tsc && electron-webpack",
"dist": "yarn compile && electron-builder"
}
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.