Node has a really bad have of creating zero byte files within the node_modules directory. When Duplicati finds one of these it throws a warning like this:
Warning-Duplicati.Library.Main.Operation.Backup.FileBlockProcessor.FileEntry-PathProcessingFailed]: Failed to process path: D:\Develop\bom-radar-card\node_modules\tsconfig-paths\node_modules\.bin\json5
Currently I have over 500 warnings (I assume they are all the same, but it is time consuming to check). Is there a way to eliminate these warnings? Ideally Duplicati should actually back them up correctly.
I am running on Windows. The files are on a NTFS fixed disk. Version: Duplicati - 2.0.6.3_beta_2021-06-17
D:\Develop\bom-radar-card\node_modules\tsconfig-paths\node_modules.bin>attrib json5
The target of the symbolic link D:\Develop\bom-radar-card\node_modules\tsconfig-paths\node_modules.bin\json5 does not exist
But when I open the project in VS Code (using containers) the links are correct.
I have tried using symlink-policy in advanced options, but I still get the warnings not matter what option I choose. Is there any way to remove the warnings?
Hi, I did a test and created a symlink that pointed to a non-existent file. I only see warnings when --symlink-policy is set to “follow”. If it’s set to “store” (the default behavior) or “ignore” I don’t get any warnings.
So if I list the symlink is a regular command prompt I get this.
D:\Develop\bom-radar-card\node_modules\tsconfig-paths\node_modules.bin>dir
Volume in drive D is Data
Volume Serial Number is 2868-0E71
Directory of D:\Develop\bom-radar-card\node_modules\tsconfig-paths\node_modules.bin
05/12/2021 10:13 AM .
05/12/2021 10:13 AM …
05/12/2021 10:13 AM json5 […]
1 File(s) 0 bytes
2 Dir(s) 113,117,831,168 bytes free
Using a git bash shell I get this.
simon@platinum MINGW64 /d/Develop/bom-radar-card/node_modules/tsconfig-paths/node_modules/.bin (master)
$ ls -l
total 0
lrwxrwxrwx 1 simon 197121 19 Dec 5 10:13 json5 → …/json5/lib/cli.js*
That link is correct and exists in the filesystem. I agree that using store which I believe is the default should be just fine. I don’t understand how the native tools have no idea, while a 3rd party shell fully understands what is going on.
Ok, so after lots more investigation. I actually think it is a bug in WSL2 and how it creates soft links.
If I open a WSL shell create a text file, create a link to it, in WSL it looks fine.
If I then go to that directory in git bash it also looks fine.
But if I do the same in a command prompt this happens.
This is really weird. The files that I was getting all the Duplicati warnings from where create in a Docker Desktop container that uses WSL under the hood.
I think for now I might just exclude any node_modules directory from the backup since it is something that can easily be redownloaded if needed.