question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot launched when electron-prebuilt-compile is available

See original GitHub issue

Since https://github.com/jprichardson/electron-mocha/pull/111, electron-prebuilt-compile is tested to determine what the electron variable should be.

However, when it is available, resolve('electron-prebuilt-compile') returns an empty hash, thus it is selected when previous proposals fail. Because this is not a valid path, electron-mocha fails with:

child_process.js:380
    throw new TypeError('"file" argument must be a non-empty string');
    ^

TypeError: "file" argument must be a non-empty string
    at normalizeSpawnArguments (child_process.js:380:11)
    at exports.spawn (child_process.js:493:38)
    (...)

Simply dropping this statement make electron-mocha work again. However, the poinf of https://github.com/jprichardson/electron-mocha/issues/110 and https://github.com/jprichardson/electron-mocha/pull/111 is to make electron-mocha compatible with electron-forge, which is my case. So I’m not sure of how to handle this.

Was it wrong to test electron-prebuilt-compile? Do I miss something?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
inukshukcommented, Apr 23, 2018

OK I removed the electron-compile from the list of NPM resolution completely; I guess #111 was misguided.

In any case, I hope it works for you again. Please note that you can also set ELECTRON_PATH as an environmet variable (pointing it to the electron binary you want to use) if the automatic resolution does not work.

0reactions
phbernardcommented, Apr 24, 2018

It now works with latest 6.0.2 release. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when importing 'electron-prebuilt-compile' #65 - GitHub
I am trying to import my angular 2 electron app and I am receiving an error when installing dependencies An unhandled error has...
Read more >
electron-prebuilt-compile - npm
Start using electron-prebuilt-compile in your project by running `npm i electron-prebuilt-compile`. There are 3 other projects in the npm ...
Read more >
Electron forge start is broken by Gulp - Stack Overflow
This is electron issue. There is a bug opened for this and it will be fixed in one of the future releases.
Read more >
electron-prebuilt-compile - npm package - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >
Electron release notes
Electron will be ending support for Windows 7/8/8.1 after version 22.x.y following Chromium's plan to end support. Older versions of Electron will continue ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found