Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cordova run electron --nobuild does nothing on cordova-electron@2.0.0 #173

Closed
4 of 6 tasks
dlzr opened this issue Nov 10, 2020 · 3 comments
Closed
4 of 6 tasks

cordova run electron --nobuild does nothing on cordova-electron@2.0.0 #173

dlzr opened this issue Nov 10, 2020 · 3 comments

Comments

@dlzr
Copy link

dlzr commented Nov 10, 2020

Issue Type

  • Bug Report
  • Feature Request
  • Support Question

Description

Trying to run the helloworld cordova app in cordova-electron 2.0.0 with the --nobuild flag results in nothing happening.

Command or Code

~/tmp $ cordova create helloworld
Creating a new cordova project.

~/tmp $ cd helloworld/

~/tmp/helloworld $ cordova platform add electron@2.0.0
Using cordova-fetch for cordova-electron@2.0.0
Adding electron project...
Creating Cordova project for cordova-electron:
	Path: /home/user/tmp/helloworld/platforms/electron
	Name: HelloCordova
Discovered plugin "cordova-plugin-whitelist". Adding it to the project
Installing "cordova-plugin-whitelist" for electron
Adding cordova-plugin-whitelist to package.json

~/tmp/helloworld $ cordova run electron --nobuild

This last command returns immediately with no app window opening. Adding --verbose shows this:

~/tmp/helloworld $ cordova run electron --nobuild --verbose
No scripts found for hook "before_run".
No scripts found for hook "before_prepare".
Checking for saved platforms that haven't been added to the project
Platform API successfully found in: /home/user/tmp/helloworld/platforms/electron/cordova/Api.js
Checking for saved plugins that haven't been added to the project
Generating config.xml from defaults for platform "electron"
Merging and updating files from [www, platforms/electron/platform_www] to platforms/electron/www
  copy  platforms/electron/platform_www/cdv-electron-settings.json platforms/electron/www/cdv-electron-settings.json (updated file)
  copy  platforms/electron/platform_www/config.xml platforms/electron/www/config.xml (updated file)
  delete platforms/electron/www/manifest.json (no source)
  delete platforms/electron/www/package.json (no source)
This app does not have icons defined
This app does not have splash screens defined.
Creating new manifest file in => undefined
No scripts found for hook "after_prepare".
No scripts found for hook "before_deploy".
No scripts found for hook "after_run".

Still, the app isn't started.

For the record, the same steps work as expected with cordova-electron@1.1.1.

Environment, Platform, Device

Debian GNU/Linux 10 (buster) amd64

Version information

cordova-electron@2.0.0
cordova@10.0.0
nodejs@12.19.0

Checklist

  • I searched for already existing GitHub issues about this
  • I updated all Cordova tooling to their most recent version
  • I included all the necessary information above
@moyancn
Copy link

moyancn commented Dec 7, 2020

windows ,the same error ,why?

@moyancn
Copy link

moyancn commented Dec 16, 2020

I have fix it in my project

file: lib/build/run.js
solution:
32 const child = execa(electron, electonArgs);
to
32 const child = execa(electron, electonArgs, { stdout: 'inherit', windowsHide: false });

@erisu
Copy link
Member

erisu commented Jan 8, 2021

Closing out this issue as it should be resolved now in the main branch. Fix was commited from PR #180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants