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 server runs and fails after short time without any specific error #22547

Closed
1 of 4 tasks
kosiakMD opened this issue Mar 27, 2024 · 5 comments
Closed
1 of 4 tasks

Comments

@kosiakMD
Copy link

Current Behavior

Current Behavior: When running the nx serve web command to start the NX Remix application, the process infinitely logs "Connecting on 127.0.0.1:3000" every second. The app works. The process runs indefinitely until it's suddenly stopped. Additionally, when trying to connect to the local server at 127.0.0.1:3000, the connection is refused with an ECONNREFUSED error.

Expected Behavior

Expected Behavior: The nx serve web command should start the NX Remix application without additional infinite connection logs. The application should run and listen on 127.0.0.1:3000 without refusing connections.

GitHub Repo

No response

Steps to Reproduce

  1. Navigate to the project directory in the terminal.
  2. Run the command nx serve web to start the NX Remix application.
  3. Observe that the process enters into a recursive or infinite loop.
  4. Attempt to connect to the local server at 127.0.0.1:3000.
  5. Observe the ECONNREFUSED error.

Nx Report

Time for 'loading dotenv files' 0.5738744735717773
Time for 'create-project-graph-async' 25.792458534240723
Time for 'total for sendMessageToDaemon()' 23.64595890045166
Time for 'deserialize daemon response' 5.457416534423828

 NX   Report complete - copy this into the issue template

Node   : 21.0.0
OS     : darwin-arm64
npm    : 10.2.0

nx (global)        : 18.0.4
nx                 : 18.0.7
@nx/js             : 18.0.7
@nx/jest           : 18.0.7
@nx/linter         : 18.0.7
@nx/eslint         : 18.0.7
@nx/workspace      : 18.0.7
@nrwl/workspace    : 18.1.2
@nx/cypress        : 18.0.7
@nx/detox          : 18.0.7
@nx/devkit         : 18.0.7
@nx/eslint-plugin  : 18.0.7
@nx/nest           : 18.0.7
@nx/node           : 18.0.7
@nx/react          : 18.0.7
@nx/remix          : 18.0.7
@nx/storybook      : 18.0.7
@nrwl/tao          : 18.0.7
@nx/vite           : 18.0.7
@nx/web            : 18.0.7
@nx/webpack        : 18.0.7
typescript         : 5.3.3
---------------------------------------
Community plugins:
@trumbitta/nx-plugin-openapi : 1.12.1
---------------------------------------
The following packages should match the installed version of nx
  - @nrwl/workspace@18.1.2

To fix this, run `nx migrate nx@18.1.2`

Failure Logs

💿  remix dev

Connecting on 127.0.0.1:3000
 warn  The following Remix future flags are now obsolete and can be removed from your remix.config.js file:
- v2_dev

 info  building...
Connecting on 127.0.0.1:3000
__dirname /Users/.../.../.../apps/web
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
 info  built (2.8s)
Connecting on 127.0.0.1:3000
[remix-serve] http://localhost:3000 (http://localhost:3000)

Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Connecting on 127.0.0.1:3000
Error connecting on 127.0.0.1:3000: ECONNREFUSED
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: connect ECONNREFUSED 127.0.0.1:3000
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 3000
}

Node.js v21.0.0

Package Manager Version

10.2.0

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

tracking via uncaughtException, unhandledRejection, handleError doesn't catch the issue

@kosiakMD kosiakMD changed the title NX Remix server runs and fails after short time without not specific error NX Remix server runs and fails after short time without any specific error Mar 27, 2024
@Coly010
Copy link
Contributor

Coly010 commented Apr 3, 2024

Hi @kosiakMD

Thanks for raising this issue.

Could you please provide more complete reproduction steps, or alternatively, provide a minimal GitHub repo containing the issue?

There are many considerations that need to be taken when trying to create a reproduction from the info you provided and so far I have not been able to reproduce it.

Things like:

  • Integrated Repo vs Standalone Repo
  • Executors being used in project.json or @nx/remix/plugin being used in nx.json
  • Was it created via create-nx-workspace -> React -> Remix
  • Was it an existing workspace where you then ran either npm install @nx/remix or nx add @nx/remix
  • Did you run nx generate @nx/remix:application?
  • Has the remix.config.js been modified in any way?
  • Have the entry files been modified or has an adapter been used?

I appreciate that this is time consuming, but without this information I cannot reproduce the issue to get a solution for you.

Copy link

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label Apr 18, 2024
@kosiakMD
Copy link
Author

Hi @Coly010, I can't provide a reproduction repo, but will try your suggestions

@github-actions github-actions bot removed the stale label Apr 19, 2024
Copy link

github-actions bot commented May 3, 2024

This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏

@github-actions github-actions bot added the stale label May 3, 2024
@Coly010 Coly010 closed this as completed May 8, 2024
@kosiakMD
Copy link
Author

kosiakMD commented May 23, 2024

@Coly010
seems the issue that original dev serve run it on locahost and nx trying to connect to 127.0.0.1 but can't
when run custom server with listen(port, process.env.HOST || '0.0.0.0',...) can access it by 127.0.0.1
can I modify host in nx settings?

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

No branches or pull requests

3 participants