had the same issue, except instead of path I had to use val for file mounts.
path
val
macOS Sonoma 14.6.1 Nextflow version 24.10.0 build 5928 Docker version 27.3.1, build ce12230