question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nx daemon throw error : Cannot read properties of null (reading 'write')

See original GitHub issue

Current Behavior

When I upgrade nx from 14.7.3 to 14.7.6 and latest 14.7.11

It will throw following errors

 >  NX   Cannot read properties of null (reading 'write')


TypeError: Cannot read properties of null (reading 'write')
    at /opt/app-root/src/node_modules/nx/src/daemon/client/client.js:170:29
    at new Promise (<anonymous>)
    at DaemonClient.<anonymous> (/opt/app-root/src/node_modules/nx/src/daemon/client/client.js:165:20)
    at Generator.next (<anonymous>)
    at /opt/app-root/src/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/opt/app-root/src/node_modules/tslib/tslib.js:114:16)
    at DaemonClient.sendMessageToDaemon (/opt/app-root/src/node_modules/nx/src/daemon/client/client.js:157:24)
    at /opt/app-root/src/node_modules/nx/src/daemon/client/client.js:112:54
    at PromisedBasedQueue.<anonymous> (/opt/app-root/src/node_modules/nx/src/utils/promised-based-queue.js:18:27)

I assume it should be some bug when nx daemon get OS socket.

event in nx 14.7.3, I always got error : nx daemon failed need to restart

Expected Behavior

No errors

Steps to Reproduce

This issue may not be prioritized if details are not provided to help us reproduce the issue.

Failure Logs

 >  NX   Cannot read properties of null (reading 'write')


TypeError: Cannot read properties of null (reading 'write')
    at /opt/app-root/src/node_modules/nx/src/daemon/client/client.js:170:29
    at new Promise (<anonymous>)
    at DaemonClient.<anonymous> (/opt/app-root/src/node_modules/nx/src/daemon/client/client.js:165:20)
    at Generator.next (<anonymous>)
    at /opt/app-root/src/node_modules/tslib/tslib.js:118:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/opt/app-root/src/node_modules/tslib/tslib.js:114:16)
    at DaemonClient.sendMessageToDaemon (/opt/app-root/src/node_modules/nx/src/daemon/client/client.js:157:24)
    at /opt/app-root/src/node_modules/nx/src/daemon/client/client.js:112:54
    at PromisedBasedQueue.<anonymous> (/opt/app-root/src/node_modules/nx/src/utils/promised-based-queue.js:18:27)

Environment

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
DaSchTourcommented, Oct 26, 2022

I’m having the same problem.

Is there a solution?

image

set NX_DAEMON=false I guess it’s not needed on CI

0reactions
github-actions[bot]commented, Nov 13, 2022

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! 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Yarn install error: NX Cannot read properties of undefined ...
I encount this issue a lot of times. Just remove the ".cache/nx" folder in your node_modules and re-run your command.
Read more >
cannot read properties of undefined (reading 'map') in angular
The code has thrown an error saying, TypeError: Cannot read properties of undefined (reading 'map') Solution: The problem arises because we're attempting to...
Read more >
Pulse · nrwl/nx · GitHub
Contribute to nrwl/nx development by creating an account on GitHub. ... Error when running affected: Cannot read properties of undefined (reading 'name').
Read more >
Module: index - Nx
It contains many utility functions for reading and writing files, updating configuration, ... throws {Error} if there is no cached ProjectGraph to read...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
issue with udev ("the udev init script is written for baselayout 2, ... init script can't stop daemon" status:RESOLVED resolution:OBSOLETE severity:normal ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found