node.js - 命令提示符中无法识别双点斜杠 - 运行 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 上运行。我如何实现这一目标?
解决方案
推荐阅读
- php - 我收到此错误:解析错误:语法错误,意外';'
- powerbi - 如何计算power bi中的总和和最大使用屏幕数?
- django - 如何使用 Django REST 框架根据字段过滤关系以响应响应
- node.js - 使用虚拟文件系统在沙箱中运行 nodejs
- flutter - 在 Widget build() 之外调用 Navigator 会产生上下文错误
- java - java.text.ParseException:在 Eclipse 控制台中输入日期时无法解析日期
- php - 从 Laravel 中的多对多关系获取列值
- python - 在 Atom 中安装 autocomplete-python 包时出错
- amazon-web-services - 通话期间提供反馈的 Amazon Transcribe/Lex
- php - 如何打印wordpress帖子?