yan-foto / electron-reload

Simplest (:pray:) way to reload an electron app on file changes!
https://www.npmjs.com/package/electron-reload
MIT License
523 stars 55 forks source link

Doesn't relaunch when main process file is changed #104

Closed ericwang401 closed 2 years ago

ericwang401 commented 2 years ago

NOTE: before openning an issue, please consult previous issues (both open and closed).

What is the problem

When I edit the main process in electron/main.ts, the file change is detected and recompiled, but electron-reload hard resets but never reopens the application.

Logs:

 [0] Starting the development server...
 [0]
 [0] Compiled successfully!
 [0]
 [0] You can now view echo in the browser.
 9:49:59 PM - File change detected. Starting incremental compilation...
 [1]
 [1]
 [1] 9:49:59 PM - Found 0 errors. Watching for file changes.
 [2] 'C:\Users\Eric' is not recognized as an internal or external command,
 [2] operable program or batch file.
 [2] wait-on http://localhost:3000 && tsc -p electron && electron . exited with code 0

How to reproduce

Source code: https://github.com/ericwang401/echo-soundboard Main process file: https://github.com/ericwang401/echo-soundboard/blob/master/electron/main.ts

  1. Run npm run electron:dev
  2. edit the console log in line 34 of the main process file

Then the file change will be detected and recompiled and then this is when it doesn't relaunch.

Additional information

Windows 10 21H2 Electron 16.0.8

yan-foto commented 2 years ago

It says what the problem is! 'C:\Users\Eric' is not recognized as an internal or external command,