The path from import.meta.url used will fail with glob.sync on Windows because it returns a windows style path that's incompatible.
Changing the line
let projectPath = dirname(fileURLToPath(import.meta.url))
to
let projectPath = dirname(fileURLToPath(import.meta.url)).split(sep).join(posix.sep); fixes the issue.
The path from
import.meta.url
used will fail with glob.sync on Windows because it returns a windows style path that's incompatible.Changing the line
let projectPath = dirname(fileURLToPath(import.meta.url))
tolet projectPath = dirname(fileURLToPath(import.meta.url)).split(sep).join(posix.sep);
fixes the issue.