cordova-electron
cordova-electron copied to clipboard
cordova build electron fails with error code 1
Bug Report
Problem
cordova build electron fails with error code 1
What is expected to happen?
Build an electron app
What does actually happen?
Build exiting with error code 1
Information
$ cordova build electron [Cordova Electron] The built package size may be larger than necessary. Please run with --verbose for more details. • electron-builder version=20.44.4 • writing effective config file=platforms/electron/build/builder-effective-config.yaml • installing production dependencies platform=darwin arch=x64 appDir=platforms/electron/www • packaging platform=darwin arch=x64 electron=4.0.1 appOutDir=platforms/electron/build/mac ⨯ node_modules.Dependency.Dependencies: ReadMapCB: expect { or n, but found [, error found in #10 byte of ...|cies" : [], "repo|..., bigger context ...|g>", "contributors" : [], "dependencies" : [], "repository" : {"type": "git", "url": "git|... Error reading package.json: platforms/electron/www/node_modules/dep-graph/node_modules/underscore/package.json
Error: node_modules/app-builder-bin/mac/app-builder exited with code 1
Command or Code
cordova build electron
Environment, Platform, Device
macOS 10.15.7
Version information
Cordova Packages:
cli: 10.0.0
common: 4.0.2
create: 3.0.0
lib: 10.0.0
common: 4.0.2
fetch: 3.0.1
serve: 4.0.0
Environment:
OS: macOS Catalina 10.15.7 (19H1323) (darwin 19.6.0) x64
Node: v16.5.0
npm: 7.19.1
ios Environment:
xcodebuild:
Xcode 12.4 Build version 12D4e
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
Same, using:
- Linux 4.19.0-16-amd64 Debian
- Cordova v10.0.0
- node v16.13.1
- npm v8.1.2