typescript - 打字稿编译器(tsc)抛出错误,但仅在纱线脚本中使用时,否则工作正常
问题描述
如果我执行:
tsc
一切都编译,没有问题。在 tsconfig.json 中提取模式
# inside package.json
scripts: {
"build" : "tsc"
}
$ yarn build
抛出错误。
error TS6307: File '***' is not in project file list. Projects must list all files or use an 'include' pattern.
error Command failed with exit code 2.
文件在模式中,因为在tsc
没有纱线的情况下运行会产生所需的效果。
为什么会发生这种情况?
解决方案
推荐阅读
- bash - Curl 和 wget 没有从 GitHub 获取最新提交的文件
- laravel - 将共享多态关系的两个模型加入或组合在一起?
- javascript - 远离现有内容
- spring-boot - 从公共库中读取 logback.xml
- java - JavaFX CheckBoxTreeItem 图形在展开/折叠时消失/出现
- python - QTableView 按 UserRole 对列数据进行排序
- elasticsearch - 我可以一次更新具有不同字段值的多个文档吗?
- c++ - 从 NuGet 下载的 OpenCV 提供 Unresolved Externals LNK2019
- android - AAR 被 ProGuard 混淆时有占位符,导致失败
- javascript - VScode HTML标签没有结束标记