首页 > 解决方案 > 命令提示符中无法识别双点斜杠 - 运行 npm 命令

问题描述

我的 lerna 项目 package.json 中有以下内容:

{
  "scripts": {
    "build": "../../node_modules/.bin/tsc"
  }
}

在 Windows bash.exe 上运行它时,我得到

'..' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-package@1.0.0 build: `../../node_modules/.bin/tsc`

我试过"build": "\"../../node_modules/.bin/tsc\""了:没有运气。我希望这个命令可以在 Windows 和 Mac 上运行。我如何实现这一目标?

标签: node.jswindow

解决方案


推荐阅读