-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
express app "serve" fails (in docker) when dependant on js lib built with tsc #17608
Comments
Similar experience. Tried disabling the nx_dameon, could not. Thinking... nx watcher uses Q: (Besides the watcher not being disabled) Does
No watchman installed: api-server | npm verb cli /usr/local/bin/node /usr/local/bin/npm
api-server | npm info using [email protected]
api-server | npm info using [email protected]
api-server | npm verb title npm run prod-start-api-server
api-server | npm verb argv "run" "prod-start-api-server" "--watch" "false" "--loglevel" "verbose"
api-server | npm verb logfile logs-max:10 dir:/home/node/.npm/_logs/2023-06-16T16_10_50_115Z-
api-server | npm verb logfile /home/node/.npm/_logs/2023-06-16T16_10_50_115Z-debug-0.log
api-server |
api-server | > [email protected] prod-start-api-server
api-server | > prisma migrate deploy && NODE_ENV=production nx run api-server:serve:production
api-server |
api-server | Prisma schema loaded from libs/prisma/schema.prisma
api-server | Datasource "db": PostgreSQL database "postgres", schema "public" at "postgres:5432"
api-server |
api-server | 4 migrations found in prisma/migrations
api-server |
api-server |
api-server | No pending migrations to apply.
api-server |
api-server | > nx run api-server:serve:production
api-server |
api-server |
api-server | > NX File change detected. Restarting...
api-server |
api-server | Watch error: Daemon closed the connection
api-server |
api-server |
api-server |
api-server | > NX Running target serve for project api-server failed
api-server |
api-server | Failed tasks:
api-server |
api-server | - api-server:serve:production
api-server |
api-server | Hint: run the command with --verbose for more details.
api-server |
api-server | npm verb exit 1
api-server | npm verb code 1
api-server exited with code 1
dependency failed to start: container api-server is unhealthy With watchman installed: api-server | npm verb cli /usr/local/bin/node /usr/local/bin/npm
api-server | npm info using [email protected]
api-server | npm info using [email protected]
api-server | npm verb title npm run prod-start-api-server
api-server | npm verb argv "run" "prod-start-api-server" "--watch" "false" "--loglevel" "verbose"
api-server | npm verb logfile logs-max:10 dir:/home/node/.npm/_logs/2023-06-16T17_05_19_652Z-
api-server | npm verb logfile /home/node/.npm/_logs/2023-06-16T17_05_19_652Z-debug-0.log
api-server |
api-server | > [email protected] prod-start-api-server
api-server | > prisma migrate deploy && NODE_ENV=production nx run api-server:serve:production
api-server |
api-server | Prisma schema loaded from libs/prisma/schema.prisma
api-server | Datasource "db": PostgreSQL database "postgres", schema "public" at "postgres:5432"
api-server |
api-server | 4 migrations found in prisma/migrations
api-server |
api-server |
api-server | No pending migrations to apply.
api-server |
api-server | > nx run api-server:serve:production
api-server |
api-server |
api-server |
api-server |
api-server | > NX Successfully ran target serve for project api-server
api-server |
api-server |
api-server | npm verb exit 0
api-server | npm info ok
dependency failed to start: container api-server is unhealthy So, the nature of the issue changed... at least by the output, but still no running service. |
Note: I experience this issue to be introduced somewhere between (nx migrate |
update: made a number of changes including I was able to resolve it by removing a docker volume on the failing service. Unknown why something is watching, why watcher could not be disabled, or why it errors in the way it does. |
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. |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
I was attempting to move my dev environment into docker and setup a little alpine image that basically just installs node and runs
npx nx serve webserver
.The server was crashing with an error
watch error: Daemon closed the connection
.Bashed my head against google a bit, tried disabling the nx_dameon, clearing node_modules, nx resettin, etc, to no avail. Started a repro repo and was able to get a minimal reproduction up. Seems like if I have an app built with @nx/express, that imports a lib built with @nx/js and using tsc as the builder, then I can reproduce the issue.
If I instead use a lib generated for node, or js with none selected as the builder, everything is fine.
Nothing I need resolved as I just moved my shared library to one without a build step, but figured I'd post it up since I had the reproduction lying around.
Expected Behavior
I'd have expected the "express" app to be able to be served regardless of its dependency on a js lib built with a tsc build step.
GitHub Repo
https://github.com/donatcranburi/nx-repro-docker-crash
Steps to Reproduce
Nx Report
Failure Logs
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: