npm 无法识别 Windows 中的点斜杠符号

npm cannot recognize dot slash notation in Windows

我有以下内容:

"scripts": {
    "foo": "./node_modules/bar",
    }

npm run test 命令产生以下结果:

'.' is not recognized as an internal or external command, operable program or batch file.

The directory separator is \ on Windows and not / as on Linux/Mac as it can be read in the Microsoft documentation about Naming Files, Paths, and Namespaces. The batch file npm.cmd is not good enough coded to fix such syntax errors automatically.

这是正确的,适用于 Git Bash