Skip to content
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

throw new Error(Failed to kill process ${pid}: ${error}) after code change #246

Open
tombohub opened this issue Jul 16, 2023 · 3 comments
Open

Comments

@tombohub
Copy link

Have you experienced this bug with the latest version of the template?

Yes

Steps to Reproduce

follow tutorial: https://remix.run/docs/en/main/tutorials/blog

  1. npx create-remix@latest --template remix-run/indie-stack blog-tutorial
  2. ? Do you want me to run npm install? Yes
  3. npm run dev
  4. copy paste code inside _index.tsx:
<div className="mx-auto mt-16 max-w-7xl text-center">
  <Link
    to="/posts"
    className="text-xl text-blue-600 underline"
  >
    Blog Posts
  </Link>
</div>

hot reload results in error:

 Mock server running
Remix App Server started at http://localhost:3000 (http://192.168.2.39:3000)

GET /?vscodeBrowserReqId=1689520104299 200 - - 120.051 ms
 info  rebuilding... (~ app\routes\_index.tsx)
 info  rebuilt (463ms)

D:\PROJEKTI\prototypes\remix-blog-tut\node_modules\@remix-run\dev\dist\devServer_unstable\proc.js:29
    throw new Error(`Failed to kill process ${pid}: ${error}`);
          ^

Error: Failed to kill process 28280: Error: Command failed with exit code 1: taskkill /F /PID 28280
ERROR: The process with PID 28280 could not be terminated.
Reason: The operation attempted is not supported.
    at kill (D:\PROJEKTI\prototypes\remix-blog-tut\node_modules\@remix-run\dev\dist\devServer_unstable\proc.js:29:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 2)
    at async Object.killtree (D:\PROJEKTI\prototypes\remix-blog-tut\node_modules\@remix-run\dev\dist\devServer_unstable\proc.js:43:3)
    at async onBuildFinish (D:\PROJEKTI\prototypes\remix-blog-tut\node_modules\@remix-run\dev\dist\devServer_unstable\index.js:236:13)        

Node.js v18.15.0

Expected Behavior

to normal hot reload and show changes on website

Actual Behavior

server breaks with error

@JohMun
Copy link

JohMun commented Jul 20, 2023

I also experience this issue on windows with node 18.13.0

@JohMun
Copy link

JohMun commented Jul 20, 2023

After removing the dev:serve script from dev, it seems to work. My package.json now looks like this:

image

@sdriffill-tm
Copy link

I can confirm am getting this error with v2 indie-stack i.e.@remix-run/serve as of SHA da0c6b7.

Error message when saving a file:

 info  rebuilding... (~ app\routes\notes.tsx)
 info  rebuilt (450ms)
Command failed with exit code 1: taskkill /F /PID 20224
ERROR: The process with PID 20224 could not be terminated.
Reason: The operation attempted is not supported.
Command failed with exit code 1: taskkill /F /PID 11228
ERROR: The process with PID 11228 could not be terminated.
Reason: The operation attempted is not supported.
 info  app server ready (806ms)
 info  hmr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants