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
Error Popup on every nx command (probably from node_modules\nx\src\daemon\server\start.js) #10822
Comments
This also happens to me. The curious thing is that with the NX Console Plugin installed it spawns a window for the error, but if the extension is disabled it only shows an error inside VSCode. It also stops showing after some time, after VSCode is closed and opened again.
|
This happens to me too. Since that one node process is never killed after build script, it blocks the dist folder from being rewritten on next build script. Apparently NX thinks the project has no changes made, so it skips building and uses the one from cache - thus leaving you with an outdated build. To fix that you have to manually kill the remaining node process. NX report:
|
We have tried to reproduce this but have not been able to. 😞 In #11247, the user was using the newer Windows Terminal but here I see people are using Powershell + Powershell Core 🤔 If anybody else has information that might help us reproduce this, please share! We will continue to try to reproduce it with any additional information provided. |
I also posted above. I am on Windows 11, with Windows Terminal, PowerShell 7.2.5. nx.json
...
"tasksRunnerOptions": {
"default": {
"runner": "nx/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"],
"useDaemonProcess": false
}
}
},
... I hope this can shine some light on the problem, but I think this is more of a workaround than a full solution. Edit: Install finishes at around 2:30 deamon.mp4 |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Not a stale. |
@FrozenPandaz You can check my exact setup here in the video
|
Also now having the same problems as #11247 Also recently upgraded to node 16.17.0, but problem still persists. |
I've spent some more time analyzing the problem. When navigating to an Nx Project and running Using I've also tried debugging the daemon.js, but since the error only happens when the code that causes the error runs in the background I've not gotten very far. @FrozenPandaz does any of this help with troubleshooting the issue on your side? |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Not stale. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Not stale, and has gotten much worse with the last update. As far as I can see, the All my colleagues are having the same problem on their windows machines. Please take another look at the problem. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I can only agree with @Jejuni. It has become worse on Windows. It would be great if you can fix that. Please do not stale. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I also have the Command Prompt Pinata 🪅, but I even have it when saving a file that's monitored by Nx.. It's driving me crazy 🤯 |
I have the same problem when working in VSCode on Windows 11. It always opens up terminal windows that close again immediately but as they steal focus it is basically not possible to work with it. |
This issue is really embarrassing when trying to promote nx in a demo or so. Kills my machine with popups. I’m now afraid to demo anything nx on windows. 😿 |
Out of curiosity
Yarn:yes |
@jbadeau Yes, yarn v1.22.19, with workspaces (via Lerna) |
I have it with npm and yarn. Not using workspaces. It also seems not related to vscode, the popups also pop up when using nx commands in the terminal. |
Npm v8.19.2 with workspaces, problem happens in vs-code, WebStorm, and just regular terminal |
i think its one process per lib in this daemon or so... nx.mp4 |
It happens to me as well and it's driving me insane |
We are also experiencing this, and we use latest:
|
@meeroslav @Coly010 can this get looked into? A lot of people are experiencing this. |
Sorry for this persistent annoying problem. You can switch off But based on your reports, it seems that the Perhaps @JamesHenry can provide more information as he was the original author of that functionality. |
I haven’t been involved in the daemon for a long time I’m afraid so can’t comment further. Rest assured folks this is a top priority for the team to resolve, please follow Miro’s advice about disabling the daemon in the meantime |
I assume that this is caused by the |
Just FYI, this also happens with the NX Console VSCode plugin. Here is a short video of enabling the plugin: nx.console.mp4
|
Hey all, I found the root cause of this. And it comes in two parts:
We're really sorry that it's taken this long to come to a root cause, and thank you everyone for your patience and understanding. The light is visible at the end of this tunnel 🙂 |
Oh, I want to clarify that there was no issue with the @parcel/watcher package. I found the issue that I was coming across that was only in the Nx repo. I'll have a PR up to fix this soon. |
@Cammisuli sadly this problem is back in the newest version, also if the NX Console extension is disabled popups happen less frequently :\
Funnily enough, it works perfectly in 15.8.5. It can be easily reproduced by creating a new NX Node Standalone app, and running 'npm run start': The problem doesn't exist if the app is created with the 15.8.5 version. Also, I keep getting 'Watch error: Daemon closed the connection' when running 'npm run start', but not sure if that is related to the same problem. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
When running any nx command, like
nx run my-app:build
ornx run my-app:test
for the first time (after a reboot, for instance) a cmd window pops up, simply stating[process exited with code 1 (0x00000001)]
:The run still seemingly completes correctly.
After that every subsequent run of any nx command completes without error.
On closer inspection I found that a node process is spawned and called with the following arguments:
"C:\Program Files\nodejs\node.exe" C:\my-workspace\node_modules\nx\src\daemon\server\start.js
This process persists even after closing the terminal.
Killing this process manually and then running any nx command makes the error come back.
Expected Behavior
No cmd windows with errors pop up.
Steps to Reproduce
This was encountered on a Windows machine version 21H2 (OS Build 22000.739).
Used shell was PowerShell Core 7.2.4 AND regular PowerShell 5.1.22000.653
Repro:
npx create-nx-workspace@latest test-workspace
, chooseangular
andscss
and cloud integration.nx run my-app:test
Environment
nx report of created workspace:
The text was updated successfully, but these errors were encountered: