nx
nx copied to clipboard
Cannot read properties of null (reading 'changedProjects')
Current Behavior
When upgrading from Nx v16 to 19, we experience a crash w/ errors.
Expected Behavior
I do not expect Nx to crash.
GitHub Repo
https://github.com/tryghost/ghost
Steps to Reproduce
- Clone our OSS repo: https://github.com/tryghost/ghost
- Update Nx to the latest version: https://github.com/TryGhost/Ghost/blob/430fbdb987c7ac181f9ae7360c4b94d745a0f35b/package.json#L121 (and run
yarn) - Re-enable the daemon process: https://github.com/TryGhost/Ghost/blob/430fbdb987c7ac181f9ae7360c4b94d745a0f35b/nx.json#L13 (we had to disable it due to a different bug)
- Run
yarn dev - Observe crash 💥
Nx Report
$ yarn nx report
yarn run v1.22.22
$ /Users/neo/code/work/Ghost/node_modules/.bin/nx report
NX Report complete - copy this into the issue template
Node : 20.17.0
OS : darwin-arm64
Native Target : aarch64-macos
yarn : 1.22.22
nx : 19.7.3
@nrwl/tao : 19.7.3
typescript : 5.4.5
✨ Done in 0.72s.
Failure Logs
[ts]
[ts] NX Watch error
[ts]
[ts] An error occurred during the watch process:
[ts] connect ENOENT /var/folders/53/2w60w5l94sb6r3gg7ydw6tl40000gn/T/459dadd7eae55fdccfe3/d.sock
[ts]
[t
[ts] batchQueue.enqueue(data.changedProjects, data.changedFiles);
[ts] ^
[ts]
[ts] TypeError: Cannot read properties of null (reading 'changedProjects')
[ts] at /Users/neo/code/work/Ghost/node_modules/nx/src/command-line/watch/watch.js:165:37
[ts] at Socket.<anonymous> (/Users/neo/code/work/Ghost/node_modules/nx/src/daemon/client/client.js:173:25)
[t
[ts] at emitErrorNT (node:internal/streams/destroy:169:8)
[ts] at emitErrorCloseNT (node:internal/streams/destroy:128:3)
[ts] at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
[ts]
[ts] Node.js v20.17.0
[ts] while [ 1 ]; do nx watch --projects=ghost/bookshelf-repository,ghost/collections,ghost/donations,ghost/email-addresses,ghost/ghost,ghost/in-memory-repository,ghost/mail-events,ghost/model-to-domain-event-interceptor,ghost/nql-filter-expansions,ghost/post-events,ghost/post-revisions,ghost/recommendations -- nx run \$NX_PROJECT_NAME:build:ts; done exited with code SIGTE
RM
Package Manager Version
1.22.22
Operating System
- [X] macOS
- [ ] Linux
- [ ] Windows
- [ ] Other (Please specify)
Additional Information
No response