-
-
Notifications
You must be signed in to change notification settings - Fork 482
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
nr dev
scripts do not run concurrently on Windows
#284
Comments
I wonder if this would work https://petermekhaeil.com/til/pnpm-shell-emulator/ ? |
Good idea, the scripts seem to work just fine with shell-emulator. However when stopping it with |
This problem did not occur on my laptop. I will do more testing/research in the coming days. System:
OS: Windows 10 10.0.22621
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 1.75 GB / 15.73 GB
Binaries:
Node: 18.18.0 - C:\Program Files\nodejs\node.EXE
npm: 10.2.0 - C:\Program Files\nodejs\npm.CMD
pnpm: 8.9.0 - ~\AppData\Local\pnpm\pnpm.EXE
Browsers:
Edge: Spartan (44.22621.2283.0), Chromium (117.0.2045.60), ChromiumDev (119.0.2151.2)
Internet Explorer: 11.0.22621.1 |
`nr dev` runs tsup in watch mode and eslint-flat-config-viewer. Both commands run indefinitely and therefore need to be executed concurrently. I assume that this is achieved by the & sign on Unix-based systems, however on my Windows system only the first command is executed. This is fixed by enabling shell-emulator as suggested in antfu#284 by @antfu.
On the system I mentioned in my first post (#284 (comment)) this problem occurs in Git Bash and in Windows CMD but not in WSL. When I stop the terminal command, the tsup command doesn't properly end (I'm not sure if this is related to tsup though, only noticed that eslint-viewer is unreachable immediately after terminating it). Sometimes the terminal will freeze completely, sometimes I can still enter things but it wont do anything (until tsup actually stops, like you can see in the screenshot). |
Merged #287 for now to move forward. I am not sure if the other issue you mentioned is related to this project or not (looks more like a WSL/setup issue to me). If any other thing we could do on our side, feel free to bring this back. Thanks. |
Describe the bug
nr dev
runs tsup in watch mode and eslint-flat-config-viewer. Both commands run indefinitely and therefore need to be executed concurrently. I assume that this is achieved by the & sign on Unix-based systems, however on my Windows system only the first command is executed.There are multiple tools which can be used to run these scripts concurrently, namely npm-run-all and concurrently. I don't have a preference here but settled with npm-run-all for my own fork (0bb5146) because the command looked slightly cleaner.
I haven't created a PR yet because #277 changes the npm scripts and this would cause a merge conflict. But I would be happy to create one once this is merged if you agree to use either npm-run-all or concurrently.
Reproduction
Here is a copy of the repo at the time this issue exists, I don't think this need to be more minimal: https://github.com/zanfee/eslint-config/tree/bug/nr-dev-windows
System Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: