apache / apache/cordova-electron

Cannot find module: './cdv-electron-settings.json'

Open
#196 1 comment 0 reactions 0 assignees View on GitHub
info-needed
Dominant language
JavaScript
Stars
135
Forks
60
Avg merge
1d 6h
Merged PRs (30d)
5

Description

# Bug Report

## Problem

I am able to build an Electron in Windows10, but when I try to install it, I'm getting an error that says Cannot find module: './cdv-electron-settings.json'

Screen Shot 2021-08-09 at 2 04 39 PM

## Information

build.json
```json
{
"electron": {
"windows": {
"package": ["zip"]
}
}
}
```

config.yml
```yml













```

res/electron/settings.json
```json
{
"browserWindow": {
"width": 1024,
"height": 768,
"resizable": true
}
}
```

### Environment, Platform, Device
Electron on Windows 10

## Checklist
- [x ] I searched for existing GitHub issues
- [ x] I updated all Cordova tooling to most recent version
- [x ] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Windows 10 install failure with build.json and the config.yml settings, then inspect how ElectronSettingsFilePath points to res/electron/settings.json and how scripts/prebuild.js packages that file. Compare the generated ZIP contents with the runtime lookup for ./cdv-electron-settings.json; done means the packaged application installs and starts without the missing-module error.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, node.js
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.