Skip to content

Error: spawn netlify-cms-proxy-server ENOENT on "astro dev #55

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

Open
techguysimon opened this issue Dec 26, 2022 Β· 8 comments
Open

Error: spawn netlify-cms-proxy-server ENOENT on "astro dev #55

techguysimon opened this issue Dec 26, 2022 Β· 8 comments

Comments

@techguysimon
Copy link

techguysimon commented Dec 26, 2022 β€’

I'm getting the following error on astro dev.

Running Mac Os Ventura
PNPM is my package manager


  πŸš€  astro  v1.7.2 started in 333ms
  
  ┃ Local    http://localhost:3000/
  ┃ Network  use --host to expose
  
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn netlify-cms-proxy-server ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn netlify-cms-proxy-server',
  path: 'netlify-cms-proxy-server',
  spawnargs: []
}

Node.js v18.12.1
 ELIFECYCLE  Command failed with exit code 1.```
@jeremy-london
Copy link

jeremy-london commented Jan 17, 2023 β€’

Same issue here: "astro-netlify-cms": "^0.5.1",

  πŸš€  astro  v1.9.2 started in 238ms
  
  ┃ Local    http://localhost:3000/
  ┃ Network  use --host to expose
  
node:events:491
      throw er; // Unhandled 'error' event
      ^

Error: spawn netlify-cms-proxy-server ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:283:19)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:289:12)
    at onErrorNT (node:internal/child_process:476:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn netlify-cms-proxy-server',
  path: 'netlify-cms-proxy-server',
  spawnargs: []
}

Node.js v18.13.0
 ELIFECYCLE  Command failed with exit code 1.

@delucis
Copy link
Owner

delucis commented Jan 17, 2023

Thanks for the reports! What package manager & OS are you using @jeremy-london?

@jeremy-london
Copy link

@delucis

Apple M2 if it matters

Mac OS Ventura 13.1
pnpm 7.22.0
node 18.13.0
astro-netlify-cms 0.5.1

I found I can run a proxy server no issue outside of the astro-netlify package, but during startup inside astro's engine this spawn process doesnt work all the way: pnpx netlify-cms-proxy-server

@coderaja8
Copy link

I got this same error. I am not sure about the solution.

Sharing the link here so that anyone can take a look and understand what's happening

https://maxschmitt.me/posts/error-spawn-node-enoent-node-js-child-process

@zanhk
Copy link

zanhk commented Sep 11, 2023

Hi is there any update on this issue? I'm using pnpm as well

@stephangriesel
Copy link

stephangriesel commented Nov 27, 2023 β€’

Yep also getting the same, using pnpm 8.7.0.:
"astro": "3.0.3"
"astro-netlify-cms": "^0.5.2",

@yicone
Copy link

yicone commented Nov 28, 2023

I modified the source code locally, and now it's working.

./node_modules/astro-netlify-cms/dist/index.js

- proxy = spawn('netlify-cms-proxy-server', { 
+ proxy = spawn('pnpx', ['netlify-cms-proxy-server'], {
    stdio: 'inherit',
    // Run in shell on Windows to make sure the npm package can be found.
    shell: process.platform === 'win32',
});
pnpm 8.7.5
node v18.17.1
astro-netlify-cms 0.5.4

@stephangriesel
Copy link

proxy = spawn('pnpx', ['netlify-cms-proxy-server'], {

This also worked for me

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

7 participants