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.

yarn dev hangs and doesn't create electron window on Windows 10

See original GitHub issue

yarn dev hangs and doesn’t create the electron window on Windows 10.

D:\dev\electron-react-boilerplate>yarn dev
yarn run v1.22.4
$ cross-env START_HOT=1 node -r @babel/register ./internals/scripts/CheckPortInUse.js && cross-env START_HOT=1 yarn start-renderer-dev
$ cross-env NODE_ENV=development webpack-dev-server --config configs/webpack.config.renderer.dev.babel.js
Starting Main Process...

> electron-react-boilerplate@1.1.0 start-main-dev D:\dev\electron-react-boilerplate
> cross-env START_HOT=1 NODE_ENV=development electron -r ./internals/scripts/BabelRegister ./app/main.dev.ts

No error message but it starts hanging after this output and the electron window doesn’t pop up. It’s only on Windows 10, Ubuntu and Mac working fine.

Prerequisites

  • Using yarn
  • Using node 10.x
  • Using an up-to-date master branch
  • Using latest version of devtools. See wiki for howto update
  • Link to stacktrace in a Gist (for bugs)
  • For issue in production release, devtools output of DEBUG_PROD=true yarn build && yarn start
  • Tried solutions mentioned in #400

Expected Behavior

yarn dev should create an electron window.

Current Behavior

yarn dev starting the Main Process but the electron window doesn’t show up. Task Manager shows 4 running electron processes but no electron window displayed on screen.

yarn start opens the electron window correctly

Possible Solution

No idea.

Steps to Reproduce (for bugs)

$ git clone https://github.com/electron-react-boilerplate/electron-react-boilerplate.git
$ yarn
$ yarn dev

Context

Cannot develop on Windows 10. No changes made in the repo and it’s working fine on Mac and Ubuntu.

Your Environment

  • Node version : 10.20.1 and 12.17.0 both same issue
  • Version or Branch used : master, v1.0.0 and v1.1.0
  • Operating System and version : Windows 10 v2004
  • Link to your project :

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

10reactions
NemoDreamcommented, May 31, 2020

According to your suggestion, I have solved the problem. I turned off the dark mode for Windows 10,and turn on the light mode,the electron window was successfully created. This is probably related to this issue electron/electron#19468

5reactions
koszticommented, May 30, 2020

turns out it’s somehow related to electron-devtools-installer and it’s hanging when trying to install REACT_DEVELOPER_TOOLS and REDUX_DEVTOOLS devtool extensions here

If I comment out installExtensions async then it will start working but obviously the React DevTools not get loaded which is not ideal. Some other workarounds reported at https://stackoverflow.com/a/58030907

Read more comments on GitHub >

github_iconTop Results From Across the Web

Electron doesn't launch app after run it in development
So the problem is, You can normally start your electron apps in windows 10 without any problem like I state in my question...
Read more >
Electron App does not open after following Windows building ...
HELP: Electron App does not open after following Windows building Instructions. directory, i get some weird errors. i have node-gyp installed ...
Read more >
electron-packager - npm
Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron ...
Read more >
A Comprehensive Guide to Fixing Node-Gyp Issues on Windows
1. Try running npm install with the --no-optional flag. ... If you're lucky, the dependency that requires node-gyp will be optional, and you...
Read more >
Creating an Electron application from scratch
Install the LTS (long-term support) version of Node from here if node -v doesn't give you sensible output on your computer's terminal/console. ( ......
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