nodemon: [nodemon] Internal watch failed: Circular symlink detected
nodemon -v: 2.0.5node -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.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 21 (4 by maintainers)
I am running a nodejs application inside a docker container.
I solved creating a nodemon.json on my project root with this content:
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.
Okay I just solved this, although tbh I am not exactly sure what caused the issue in the first place. Seems to be a Docker configuration issue though, not an issue with nodemon.
Or, with docker-compose.yml
Then run
@dougecomp works great!
Getting a similar issue here:
node -v: v10.19.0nodemon -v: 2.0.6[nodemon] Internal watch failed: Circular symlink detected: “/usr/bin/X11” points to “/usr/bin”
@haydenlinder do you think this (your solution) belongs in the FAQ?