Skip to content

Reload/refresh not working in v18 and v17 #22945

Description

@poeck

Current Behavior

When I serve my NestJS project in development and change a file, it reloads perfectly the first time. When I change the file again, it stop refreshing and does nothing. This also happens in a fresh project with npx create-nx-workspace my-workspace --preset=nest

Expected Behavior

It should refesh every time I change a file, not only the first time.

GitHub Repo

No response

Steps to Reproduce

  1. Create a new nest project npx create-nx-workspace my-workspace --preset=nest
  2. Run nx serve api
  3. Change a file
  4. See how it reloads
  5. Change the file again
  6. Nothing happens

Nx Report

NX   Report complete - copy this into the issue template

Node   : 18.18.2
OS     : linux-x64
pnpm   : 8.15.2

nx (global)        : 18.3.3
nx                 : 18.3.3
@nx/js             : 18.3.3
@nx/eslint         : 18.3.3
@nx/workspace      : 18.3.3
@nx/eslint-plugin  : 18.3.3
@nx/express        : 18.3.3
@nx/nest           : 18.3.3
@nx/next           : 18.3.3
@nx/node           : 18.3.3
@nx/web            : 18.3.3
@nx/webpack        : 18.3.3
typescript         : 5.4.5
---------------------------------------
Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
@nx/next/plugin

Failure Logs

Daemon Log:

[NX Daemon Server] - 2024-04-22T19:14:18.253Z - Started listening on: /tmp/9e9a81d0946c1ff77af8/d.sock
[NX Daemon Server] - 2024-04-22T19:14:18.254Z - [WATCHER]: Subscribed to changes within: /home/paul/dev/jokedial (native)
[NX Daemon Server] - 2024-04-22T19:14:18.255Z - Established a connection. Number of open connections: 1
[NX Daemon Server] - 2024-04-22T19:14:18.255Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-04-22T19:14:18.256Z - [REQUEST]: Client Request for Project Graph Received
[NX Daemon Server] - 2024-04-22T19:14:18.313Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...
[NX Daemon Server] - 2024-04-22T19:14:18.313Z - [REQUEST]: 
[NX Daemon Server] - 2024-04-22T19:14:18.313Z - [REQUEST]: 
[NX Daemon Server] - 2024-04-22T19:14:19.723Z - [REQUEST]: Responding to the client. project-graph
[NX Daemon Server] - 2024-04-22T19:14:19.725Z - Time taken for 'total for creating and serializing project graph' 1466.750123001635ms
[NX Daemon Server] - 2024-04-22T19:14:19.725Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-04-22T19:14:19.727Z - Done responding to the client project-graph
[NX Daemon Server] - 2024-04-22T19:14:19.727Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 1467. Response time: 4.
[NX Daemon Server] - 2024-04-22T19:14:19.749Z - [REQUEST]: Responding to the client. handleHashTasks
[NX Daemon Server] - 2024-04-22T19:14:19.749Z - Done responding to the client handleHashTasks
[NX Daemon Server] - 2024-04-22T19:14:19.749Z - Handled HASH_TASKS. Handling time: 11. Response time: 0.
[NX Daemon Server] - 2024-04-22T19:14:19.749Z - Time taken for 'Load Nx Plugin: /home/paul/dev/jokedial/node_modules/.pnpm/nx@18.3.3_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/plugins/project-json/build-nodes/package-json-next-to-project-json' 0.31881099939346313ms
[NX Daemon Server] - 2024-04-22T19:14:19.882Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-04-22T19:14:19.883Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-04-22T19:14:19.883Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-04-22T19:14:19.884Z - [REQUEST]: Client Request for Project Graph Received
[NX Daemon Server] - 2024-04-22T19:14:19.885Z - [REQUEST]: Responding to the client. project-graph
[NX Daemon Server] - 2024-04-22T19:14:19.886Z - Time taken for 'total for creating and serializing project graph' 0.4925150014460087ms
[NX Daemon Server] - 2024-04-22T19:14:19.887Z - Done responding to the client project-graph
[NX Daemon Server] - 2024-04-22T19:14:19.887Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 1. Response time: 2.
[NX Daemon Server] - 2024-04-22T19:14:19.890Z - Established a connection. Number of open connections: 3
[NX Daemon Server] - 2024-04-22T19:14:20.008Z - Established a connection. Number of open connections: 4
[NX Daemon Server] - 2024-04-22T19:14:20.009Z - Closed a connection. Number of open connections: 3
[NX Daemon Server] - 2024-04-22T19:14:20.009Z - Established a connection. Number of open connections: 4
[NX Daemon Server] - 2024-04-22T19:14:20.010Z - [REQUEST]: Client Request for Project Graph Received
[NX Daemon Server] - 2024-04-22T19:14:20.011Z - [REQUEST]: Responding to the client. project-graph
[NX Daemon Server] - 2024-04-22T19:14:20.012Z - Time taken for 'total for creating and serializing project graph' 0.68766800314188ms
[NX Daemon Server] - 2024-04-22T19:14:20.013Z - Done responding to the client project-graph
[NX Daemon Server] - 2024-04-22T19:14:20.013Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 1. Response time: 2.
[NX Daemon Server] - 2024-04-22T19:14:20.031Z - [REQUEST]: Responding to the client. handleHashTasks
[NX Daemon Server] - 2024-04-22T19:14:20.031Z - Done responding to the client handleHashTasks
[NX Daemon Server] - 2024-04-22T19:14:20.031Z - Handled HASH_TASKS. Handling time: 6. Response time: 0.
[NX Daemon Server] - 2024-04-22T19:14:20.031Z - Time taken for 'Load Nx Plugin: /home/paul/dev/jokedial/node_modules/.pnpm/nx@18.3.3_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/plugins/project-json/build-nodes/package-json-next-to-project-json' 0.2610890008509159ms
[NX Daemon Server] - 2024-04-22T19:14:20.542Z - [WATCHER]: Processing file changes in outputs
[NX Daemon Server] - 2024-04-22T19:14:22.937Z - [REQUEST]: Responding to the client. recordOutputsHash
[NX Daemon Server] - 2024-04-22T19:14:22.937Z - Done responding to the client recordOutputsHash
[NX Daemon Server] - 2024-04-22T19:14:22.937Z - Handled RECORD_OUTPUTS_HASH. Handling time: 0. Response time: 0.
[NX Daemon Server] - 2024-04-22T19:14:22.950Z - Closed a connection. Number of open connections: 3
[NX Daemon Server] - 2024-04-22T19:14:22.954Z - [WATCHER]: Processing file changes in outputs
[NX Daemon Server] - 2024-04-22T19:14:23.654Z - [WATCHER]: 0 file(s) created or restored, 0 file(s) modified, 2 file(s) deleted
[NX Daemon Server] - 2024-04-22T19:14:23.655Z - [REQUEST]: Responding to the client. File watch changed
[NX Daemon Server] - 2024-04-22T19:14:23.655Z - Done responding to the client File watch changed
[NX Daemon Server] - 2024-04-22T19:14:23.655Z - Handled FILE-WATCH-CHANGED. Handling time: 0. Response time: 0.
[NX Daemon Server] - 2024-04-22T19:14:23.655Z - [WATCHER]: Processing file changes in outputs
[NX Daemon Server] - 2024-04-22T19:14:23.655Z - Time taken for 'changed-projects' 0.2585260011255741ms
[NX Daemon Server] - 2024-04-22T19:14:23.756Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...
[NX Daemon Server] - 2024-04-22T19:14:23.756Z - [REQUEST]: 
[NX Daemon Server] - 2024-04-22T19:14:23.756Z - [REQUEST]: apps/api/src/main.ts,apps/api/src/4913
[NX Daemon Server] - 2024-04-22T19:14:23.793Z - Established a connection. Number of open connections: 4
[NX Daemon Server] - 2024-04-22T19:14:23.794Z - Established a connection. Number of open connections: 5
[NX Daemon Server] - 2024-04-22T19:14:23.794Z - Time taken for 'Load Nx Plugin: /home/paul/dev/jokedial/node_modules/.pnpm/nx@18.3.3_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/plugins/project-json/build-nodes/package-json-next-to-project-json' 0.24877099692821503ms
[NX Daemon Server] - 2024-04-22T19:14:23.794Z - [REQUEST]: Client Request for Project Graph Received
[NX Daemon Server] - 2024-04-22T19:14:23.794Z - [REQUEST]: Responding to the client. project-graph
[NX Daemon Server] - 2024-04-22T19:14:23.796Z - Time taken for 'total for creating and serializing project graph' 0.41770799830555916ms
[NX Daemon Server] - 2024-04-22T19:14:23.796Z - Closed a connection. Number of open connections: 4
[NX Daemon Server] - 2024-04-22T19:14:23.796Z - Done responding to the client project-graph
[NX Daemon Server] - 2024-04-22T19:14:23.797Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 0. Response time: 3.
[NX Daemon Server] - 2024-04-22T19:14:23.819Z - [REQUEST]: Responding to the client. handleHashTasks
[NX Daemon Server] - 2024-04-22T19:14:23.819Z - Done responding to the client handleHashTasks
[NX Daemon Server] - 2024-04-22T19:14:23.819Z - Handled HASH_TASKS. Handling time: 10. Response time: 0.
[NX Daemon Server] - 2024-04-22T19:14:23.819Z - Time taken for 'Load Nx Plugin: /home/paul/dev/jokedial/node_modules/.pnpm/nx@18.3.3_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/plugins/project-json/build-nodes/package-json-next-to-project-json' 0.2331859990954399ms
[NX Daemon Server] - 2024-04-22T19:14:24.318Z - [WATCHER]: Processing file changes in outputs
[NX Daemon Server] - 2024-04-22T19:14:26.577Z - [REQUEST]: Responding to the client. recordOutputsHash
[NX Daemon Server] - 2024-04-22T19:14:26.577Z - Done responding to the client recordOutputsHash
[NX Daemon Server] - 2024-04-22T19:14:26.577Z - Handled RECORD_OUTPUTS_HASH. Handling time: 0. Response time: 0.
[NX Daemon Server] - 2024-04-22T19:14:26.589Z - Closed a connection. Number of open connections: 3
[NX Daemon Server] - 2024-04-22T19:14:26.600Z - [WATCHER]: Processing file changes in outputs
[NX Daemon Server] - 2024-04-22T19:14:27.575Z - [WATCHER]: 0 file(s) created or restored, 0 file(s) modified, 2 file(s) deleted
[NX Daemon Server] - 2024-04-22T19:14:27.576Z - [WATCHER]: Processing file changes in outputs
[NX Daemon Server] - 2024-04-22T19:14:27.577Z - Time taken for 'changed-projects' 0.33142799884080887ms
[NX Daemon Server] - 2024-04-22T19:14:27.679Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...
[NX Daemon Server] - 2024-04-22T19:14:27.679Z - [REQUEST]: 
[NX Daemon Server] - 2024-04-22T19:14:27.679Z - [REQUEST]: apps/api/src/4913,apps/api/src/main.ts
[NX Daemon Server] - 2024-04-22T19:14:27.759Z - Time taken for 'Load Nx Plugin: /home/paul/dev/jokedial/node_modules/.pnpm/nx@18.3.3_@swc-node+register@1.8.0_@swc+core@1.3.107/node_modules/nx/src/plugins/project-json/build-nodes/package-json-next-to-project-json' 1.7185580022633076ms
[NX Daemon Server] - 2024-04-22T19:14:30.088Z - Closed a connection. Number of open connections: 2
[NX Daemon Server] - 2024-04-22T19:14:30.091Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-04-22T19:14:30.096Z - Closed a connection. Number of open connections: 0

Package Manager Version

pnpm@8.15.2

Operating System

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

Additional Information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions