Windows paths have their own separator and parser. Node's explicit Windows path helpers let a Linux build process inspect them predictably.
Worked example
import { win32 as path } from "node:path";
console.log(path.sep);Result
\Implementation notes
Escaping a backslash in a JavaScript string changes how the source looks. Inspect the resulting character value before diagnosing the path parser.
Try it yourself
Compare a drive-qualified path with a POSIX asset path.
Open the Node.js example →Editorial date April 23, 2026 · Published December 6, 2026