Skip to content
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

Daemon error #8950

Closed
qamar2 opened this issue Feb 13, 2022 · 11 comments
Closed

Daemon error #8950

qamar2 opened this issue Feb 13, 2022 · 11 comments

Comments

@qamar2
Copy link

qamar2 commented Feb 13, 2022

Current Behavior

When running this command:

nx serve erp --configuration development --host 0.0.0.0 --disable-host-check

I got this error:

Log file with the error: ./node_modules/.cache/nx/d/daemon-error.log
Please file an issue at https://github.com/nrwl/nx
Nx Daemon is going to be disabled until you run "nx reset".

Expected Behavior

Steps to Reproduce

Failure Logs

Environment

daemon-error.log

@FrozenPandaz FrozenPandaz added the scope: core core nx functionality label Feb 14, 2022
@tcoz
Copy link

tcoz commented Mar 11, 2022

I am seeing this as well.

I run npx create-nx-workspace my-project --profile=react

It seems to complete the creation of the workspace, installs everything etc, but at the very end of the operation it throws this error:

NX Nx Daemon was not able to compute the project graph.

Log file with the error: C:...etc\daemon-error.log
Please file an issue at https://github.com/nrwl/nx
Nx Daemon is going to be disabled until you run "nx reset".

So I install the nx cli and run nx reset. That seems to work (I have not tested the workspace fully, but at least the error message says it completed successfully):

C:\Users...etc>nx reset

NX Resetting the Nx workspace cache and stopping the Nx Daemon.

This might take a few minutes.

NX Daemon Server - Stopped

NX Successfully reset the Nx workspace.

Note this is on Windows. I've never seen this on my Macs.

Thanks :)

@tcoz
Copy link

tcoz commented Mar 11, 2022

Update: the issue isn't resolved by running nx reset.

When I start my-project, the error repeats.

C:...etc>nx run my-project:serve

NX Nx Daemon was not able to compute the project graph.

Log file with the error: C:...\my-project\node_modules.cache\nx\d\daemon-error.log
Please file an issue at https://github.com/nrwl/nx
Nx Daemon is going to be disabled until you run "nx reset".

The project does serve, but this error persists whenever your run a command.

@tcoz
Copy link

tcoz commented Mar 11, 2022

For what it's worth, this also appears in the console when I serve the project:

WARNING in DefinePlugin
Conflicting values for 'process.env.NODE_ENV'

I am running node 14.18.1

@julianess
Copy link

julianess commented Mar 29, 2022

I found out that this has something to do with your workspace setup. If you are using git as version control the project graph internally uses git-base-file-hasher which works fine for both symstems: Windows and MacOS. If you are not using git (e.g. TFVC) the project-graph falls back to a node-based-file-hasher which delivers on Windows paths like "dir\\subdir\\file.ts" instead git-based and node-based hasher on MacOS deliver paths like "dir/subdir/file.ts". With a wrong file path the file is not considered as part of any project and therefore the cache does not have any files inside the projects. @FrozenPandaz this should be fixable quite easily on short term with my description, isn't it?

@AgentEnder
Copy link
Member

@qamar2 can you confirm that you are on windows and not using git? If so, #9585 may also fix this issue.

@qamar2
Copy link
Author

qamar2 commented Mar 30, 2022

No, I'm not on Windows, I am on Linux.

@jeffascript
Copy link

I am also experiencing the same issue especially while starting up a react app, even after running the nx rest. I'm using a mac btw

@moisescer
Copy link

I'm having the same issue when I running the command to create a docker image @nx-tools/nx-docker:build
OS: MacOS

@SuneRadich
Copy link

For what it's worth, this also appears in the console when I serve the project:

WARNING in DefinePlugin Conflicting values for 'process.env.NODE_ENV'

I am running node 14.18.1

Is this confirmed as being related? I see the DefinePlugin error after migrating to nx 14.1.9, but I am not currently seeing any issues with the daemon.

@github-actions
Copy link

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

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

8 participants