Open kosiakMD opened 8 months ago
Could you provide a minimal reproduction repo?
@brophdawg11 basically, the issue is only on my own Mac, all the rest developers aren't struggling with this I cleaned caches, node modules, updated remix and nx, and still the same result I'm mostly asking about any assumptions or suggestions on where to look or what to change in some configs Before adding additional logging to see connecting by nx server before Remix started, I was sure it was a watcher issue, but now I see it starts to connect before the remix build started
my remix app project file
{
"name": "web",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/web",
"projectType": "application",
"tags": [],
"targets": {
"build": {
"executor": "@nx/remix:build",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/apps/web"
},
"configurations": {
"production": {
"sourcemap": false
},
"development": {
"sourcemap": true
}
}
},
"lint": {
"executor": "nx:run-commands",
"options": {
"command": "eslint ./src/**/*.{ts,tsx}",
"cwd": "{projectRoot}"
}
},
"lint-nx": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/web/src/**/*.{ts,tsx}"]
}
},
"serve": {
"executor": "@nx/remix:serve",
"options": {
"port": 3000
}
},
"start": {
"dependsOn": ["build"],
"command": "remix-serve build",
"options": {
"cwd": "apps/web"
}
},
"typecheck": {
"command": "tsc",
"options": {
"cwd": "apps/web"
}
},
"storybook": {
"executor": "@nx/storybook:storybook",
"options": {
"port": 4400,
"configDir": "apps/web/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"build-storybook": {
"executor": "@nx/storybook:build",
"outputs": ["{options.outputDir}"],
"options": {
"outputDir": "dist/storybook/web",
"configDir": "apps/web/.storybook"
},
"configurations": {
"ci": {
"quiet": true
}
}
},
"test-storybook": {
"executor": "nx:run-commands",
"options": {
"command": "test-storybook -c apps/web/.storybook --url=http://localhost:4400"
}
},
"static-storybook": {
"executor": "@nx/web:file-server",
"options": {
"buildTarget": "web:build-storybook",
"staticFilePath": "dist/storybook/web"
},
"configurations": {
"ci": {
"buildTarget": "web:build-storybook:ci"
}
}
},
"docker-build": {
"dependsOn": ["build"],
"command": "docker build -f apps/web/Dockerfile . -t web"
}
}
}
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?
Reproduction
First of all, I know that's it could be the issue with @nx/remix runner, but if not might be can help me here?
System Info
Used Package Manager
npm
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.
Actual 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.