Code Monkey home page Code Monkey logo

Comments (9)

delucis avatar delucis commented on June 6, 2024

Oh interesting! I guess this is an issue with running an npm package from the command line on Windows maybe? I don’t have a Windows machine to test on unfortunately.

I’d be interested to see if npx netlify-cms-proxy-server in the spawn call might work if it’s an issue with finding the command?

from astro-netlify-cms.

preetamslot avatar preetamslot commented on June 6, 2024

Think that windows need a "shell = true".
this seems to work for me:

'astro:server:start': () => {
                const proxy = spawn('npx netlify-cms-proxy-server', { stdio: 'inherit', shell: process.platform == 'win32' });
                process.on('exit', () => proxy.kill());
            },

from astro-netlify-cms.

delucis avatar delucis commented on June 6, 2024

Thanks for investigating! Would you like to make this change in a PR?

from astro-netlify-cms.

preetamslot avatar preetamslot commented on June 6, 2024

I can't test if this solution works on Linux or OSX, so it could potentially introduce more bugs than it fixes :P

from astro-netlify-cms.

delucis avatar delucis commented on June 6, 2024

I can test it on macOS and can take a look at setting up some CI tests for Linux!

from astro-netlify-cms.

csadio avatar csadio commented on June 6, 2024

Seeing the same issue on Windows.
@delucis & @preetamslot is there an ETA on the pull request merge?
Thanks!

from astro-netlify-cms.

delucis avatar delucis commented on June 6, 2024

I think #15 was going to address two separate things, so I’ve pushed @preetamslot’s simple fix for Windows as a separate commit for now. Released in v0.2.0 — let me know how you get on!

from astro-netlify-cms.

zanami avatar zanami commented on June 6, 2024

I have the same issue with Yarn (classic or stable) on macOS.
pnpm works

git clone delucis/astro-netlify-cms-starter
yarn
...

% yarn dev
  🚀  astro  v1.5.2 started in 85ms

  ┃ Local    http://localhost:3001/
  ┃ 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:285:19)
    at onErrorNT (node:internal/child_process:483: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:291:12)
    at onErrorNT (node:internal/child_process:483: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 v19.2.0
% yarn -v
3.3.0

from astro-netlify-cms.

techguysimon avatar techguysimon commented on June 6, 2024

I'm experiencing the same issue using pnpm

> astro dev

  🚀  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.

from astro-netlify-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.