I’m using node.js, vite, react and an express server. I’m also using a few other packages but those are the one’s that I feel are most important.
I created a task in tasks.json for a build and run command which runs npm run build; node server/server.js
in the terminal.
Everything was working fine. I could start the task with cmd + shift + b and stop it with ctrl + c. But then I wanted to see if the server would continue to run if I closed the workspace’s tab, and it did.
But then I opened the workspace again and I couldn’t see anything in the terminal. Pressing ctrl + c didn’t stop the server.
I tried googling the issue. One of the results told me to press cmd + shift + p and writing terminate task, and when I did, it said no tasks were running. Even though going to the weburl loaded the page, and it said that the port was being used. I tried asking gemini which told me to run the hard reset command and I did, but it still didn’t kill the process. I reloaded the workspace, closed all open terminal tabs, tried to run the build and run command again on the same port (which gave the error that the port was already in use), deleted tasks.json and even tried coming back about an hour later and it was still running.
How do I stop the server