Nodemon: [nodemon] Internal watch failed: Circular symlink detected

Created on 19 Oct 2020  路  13Comments  路  Source: remy/nodemon

  • nodemon -v: 2.0.5
  • node -v: 12.19.0
  • Operating system/terminal environment:
  • Using Docker? What image: node:lts-alpine
  • Command you ran: CMD ["nodemon", "--config", "/app/src/ScheduleService-nodemon.json", "/app/src/ScheduleService/index.js"]

Before this hell started, Nodemon was working fine. I have deleted all Docker images and caches and re-build everything from scratch. So the versions should be the latest.

Expected behaviour

Nodemon should be monitoring files without issues.

Actual behaviour

Nodemon reports an error:
...
[nodemon] Internal watch failed: Circular symlink detected: "/sys/class/cpuid/cpu0/subsystem" points to "/sys/class/cpuid"
...
[nodemon] Internal watch failed: Circular symlink detected: "/sys/class/bdi/0:85/subsystem" points to "/sys/class/bdi"
...

Steps to reproduce

Start the image.


If applicable, please append the --dump flag on your command and include the output here ensuring to remove any sensitive/personal details or tokens.

remy working on it stale

Most helpful comment

I am running a nodejs application inside a docker container.

I solved creating a nodemon.json on my project root with this content:

{
  "watch": ["src"],
  "ext": "js"
}

The watch option only update when anything on my src folder changes. Without it, nodemon watches all files of the system, generating the error. Maybe a possible fix is to make nodemon observe by default the files on current directory and subdirectories.

All 13 comments

Getting a similar issue here:

  • Docker Image: osgeo/gdal:ubuntu-small-latest (based on ubuntu:20.04)
  • node -v: v10.19.0
  • nodemon -v: 2.0.6
  • Command: nodemon -L /my-app/index.js

[nodemon] Internal watch failed: Circular symlink detected: "/usr/bin/X11" points to "/usr/bin"

Getting a similar issue:

  • node -v: 6.14.8
  • Command: nodemon --watch src -e js,ts --exec "npm run compile"

[nodemon] Internal watch failed: Circular symlink detected: "C:\Users\user\AppData\Local\Application Data" points to "C:\Users\user\AppData\Local"

EDIT:
Fixed by navigating to C:\Users\user\AppData\Local\ and doing rmdir "Application Data" since it was an empty folder. Before doing this, make sure Application Data is empty.

@tomhuntley did you resolve this? Getting the same "/usr/bin/X11" points to "/usr/bin" error

@andrewlew1s no, i couldn't resolve it. I've had to temporarily run the app outside docker while developing. It seems ok for me on windows.

Can you add the following to your nodemon.json and let me know how you get on:

{
  "watchOptions": {
    "followSymlinks": false
  }
}

Tried. And without any luck. The same problem still persists.

@AlexeyPlodenko can you provide a pared down repo to replicate from?

@AlexeyPlodenko okay, not being a docker user, can you provide instructions? Assume I know nothing about Docker (which is accurate) (utterly aside, it's pared down)

I am running a nodejs application inside a docker container.

I solved creating a nodemon.json on my project root with this content:

{
  "watch": ["src"],
  "ext": "js"
}

The watch option only update when anything on my src folder changes. Without it, nodemon watches all files of the system, generating the error. Maybe a possible fix is to make nodemon observe by default the files on current directory and subdirectories.

@dougecomp works great!

We are also using a nodemon.json configuration file:

{
  "watch": [
    "APIService/",
    "shared/"
  ],
  "ext": "js,json"
}

And it does not sort the issue.

This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up.
Thank you for contributing <3

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hkeio picture hkeio  路  3Comments

dimsmol picture dimsmol  路  4Comments

jonerer picture jonerer  路  4Comments

robboerman picture robboerman  路  3Comments

Exeteres picture Exeteres  路  4Comments