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

@nx/remix | serve executor | command option not working properly #334

Open
Mat-moran opened this issue Sep 4, 2023 · 1 comment
Open

Comments

@Mat-moran
Copy link

Hi,
I am trying to configure MSW in a Remix app and I am stuck with the serve executor command.

This is how they launch MSW in the Indie Stack Remix template.

"dev": "remix dev -c \"npm run dev:serve\"",
"dev:serve": "binode --require ./mocks -- @remix-run/serve:remix-serve ./build",

In order to do that with the @nx/remix serve executor is necessary to pass the -command flag wich I am doing in this way.

"serve": {
      "executor": "@nx/remix:serve",
      "options": {
        "port": 4200,
        "command": "pnpm run \"binode --require ./app/tests/mocks -- @remix-run/serve:remix-serve ./build\""
      }
    },

but it is giving me the next error

 ERR_PNPM_NO_SCRIPT  Missing script: "binode
Command ""binode" not found.
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
Error: connect ECONNREFUSED 127.0.0.1:4200
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1300:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 4200
}
Node.js v18.12.1

Also this is maybe related with #331 because in order to use -c flag in the remix cli, the v2_dev flag in remix.config should be true.

Any one can help on this? 🙏
Thanks

@Mat-moran Mat-moran changed the title @nx/remix | command option not working properly @nx/remix | serve executor | command option not working properly Sep 4, 2023
@kosiakMD
Copy link

@Mat-moran does it fail at the run? I have the same error after some time after a successful run
nrwl/nx#22547

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

2 participants