FriendsOfSymfony / FOSJsRoutingBundle

A pretty nice way to expose your Symfony routing to client applications.
1.48k stars 260 forks source link

Error: spawn bin/console ENOENT #453

Closed NOaMTL closed 1 year ago

NOaMTL commented 1 year ago

Hello, I am trying to install the package, I am using webpack encore, following the doc, using .addPlugin(new FosRouting()), and I have this error when I run yarn watch.

Error: spawn bin/console ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:485:16)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'spawn bin/console',
  path: 'bin/console',
  spawnargs: [
    'fos:js-routing:dump',
    '--target=C:\\ALTIS\\symfony\\project\\var\\cache\\fosRoutes.tmp.json',
    '--format=json'
  ],
  cmd: 'bin/console fos:js-routing:dump --target=C:\\ALTIS\\symfony\\project\\var\\cache\\fosRoutes.tmp.json --format=json',
  stdout: '',
  stderr: ''
}

I am using Windows 11, Symfony 6.2, yarn 1.22.19, npm 8.19.2, php 8.1, FOSJS 3.2.1.

Thank you.

mehdichati commented 1 year ago

I have the same issue, in my CI/CD

pentiminax commented 1 year ago

I have the same issue

benjaminfunk commented 1 year ago

Same here. Nearly the same environment like NOaMTL

benjaminfunk commented 1 year ago

maybe it has something to do with https://github.com/FriendsOfSymfony/FOSJsRoutingBundle/pull/444

Edit: #444 will fix the problem on windows machines!

tobias-93 commented 1 year ago

Hi all, I've just released version 3.3.0 with the fix included. Please let me know if that is working for you.

benjaminfunk commented 1 year ago

It works for me. Thank you!

tobias-93 commented 1 year ago

Perfect, closing the issue 👍🏼