apache / apache/cordova-electron

cordova build electron fails with error code 1

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

Description

# 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

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `cordova build electron` on the reported macOS and versions. Inspect the error around `platforms/electron/www/node_modules/dep-graph/node_modules/underscore/package.json` and the Electron packaging output; done means the Electron app builds without error code 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, node.js
Domain
build-system, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.