Open karanmartian opened 3 years ago
Not sure, windows is always the odd one out. I don't use windows much.
Was this issue with the config you posted? May be the double plugin?
@fivethreeo No this was with a clean install on Windows, no Hapi stuff. just default express. doesnt seem to take rs or any other input at all, it only takes ctrl c.
Ok so I figured that the with-typescript example is not accepting rs
It runs tsc for typecheking aswell as razzle start. So diff output is expected. If you try without tsc?
Yea the watch mode was creating problems. I changed it to below:
"scripts": { "start:tsc": "tsc -b", "start": "razzle start", "build": "tsc -b && razzle build", "test": "razzle test --env=jsdom", "start:prod": "NODE_ENV=production node build/server.js" },
Then first I independently run start:tsc and then start. It seems to be working now and I can restart using rs
maybe using concurrently works?
Well with concurrently and watch mode on for tsc it keeps restarting the server endlessly with my Hapi SIGTERM configuration
Input handling -i, --handle-input Whether input should be forwarded to the child processes. See examples for more information.[boolean] --default-input-target Identifier for child process to which input on stdin should be sent if not specified at start of input. Can be either the index or the name of the process.
Add --noEmit to tsc incase it does not get it from tsconfig.
Got it with: "start": "concurrently --handle-input true --default-input-target 1 \"tsc -b -w --preserveWatchOutput\" \"razzle start\""
I actually shifted entirely to wsl 2 on windows and installed Vscode inside wsl 2, not windows and I am operating from there i.e. opening vscode using the new GUI App Support in wsl 2 in windows 11. So this is tested on linux which wasn't working before for Typescript. But should work fine on Windows as well. The only reason I am not using the Vscode on Windows is because it fails to auto refresh my changes made from wsl 2 inside explorer and source control views.
But the problem still arises in typescript,
With concurrently on, whenever I auto reload the server with my Hapi SIGTERM config for any file change it keeps restarting the server endlessly. Without concurrently this is not an issue. Is there any other program other than concurrently?
🐛 Bug report
Current Behavior
rs not working on Windows in any shell
Expected behavior
should restart the server. Its working fine on my Mac. Is this something that has to do with nodemon on Windows?