Essentially, both Linux and Windows allow for path.delimiter to appear in directory names. NPM handles this gracefully in all cases that I've encountered, but the latest NPX chokes.
A little background on why I have to put a colon in my directory name:
I develop on Windows (VS Code) but the vast majority of my source lives on my Linux box. I do a lot of debugging using Chrome's DevTools and Node's inspector. Due to VS Code's strange path mapping and lax/outdated documentation, I just decided to replicate the Windows path—including the "root" colon—on Linux so everything would Just Work (tm). And now everything does work! ... except now NPX doesn't work. After some digging, it turned out that it was because NPX prepends npm bin to process.env.PATH, even if the prepended path has the OS's path.delimiter in it.
NPM handles this gracefully AFAIK. I believe NPX should parallel NPM in this regard.
The problem is illustrated succinctly below:
Essentially, both Linux and Windows allow for
path.delimiter
to appear in directory names. NPM handles this gracefully in all cases that I've encountered, but the latest NPX chokes.A little background on why I have to put a colon in my directory name:
I develop on Windows (VS Code) but the vast majority of my source lives on my Linux box. I do a lot of debugging using Chrome's DevTools and Node's inspector. Due to VS Code's strange path mapping and lax/outdated documentation, I just decided to replicate the Windows path—including the "root" colon—on Linux so everything would Just Work (tm). And now everything does work! ... except now NPX doesn't work. After some digging, it turned out that it was because NPX prepends
npm bin
toprocess.env.PATH
, even if the prepended path has the OS'spath.delimiter
in it.NPM handles this gracefully AFAIK. I believe NPX should parallel NPM in this regard.