首页 > 解决方案 > tsc 中可笑的错误跟踪。如何添加更多详细信息?

问题描述

我正在尝试使用tsconfig.json提供的默认值编译一个反应项目,但create-react-app我收到了这个我找不到源代码的荒谬错误。

$ tsc
error TS2488: Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.

当我尝试跑步时,npm run build我得到:

Creating an optimized production build...
Failed to compile.

TypeScript error in undefined(undefined,undefined):
Type 'never' must have a '[Symbol.iterator]()' method that returns an iterator.  TS2488

是的!这就是我得到的一切,没有别的。没有文件,什么都没有。有没有办法获得更详细的信息,或者找到编译器的完整日志?谢谢!

标签: typescriptcompiler-errorscompilation

解决方案


尝试 npm run build -- --verbose

查看:

https://docs.npmjs.com/cli/v7/using-npm/config


推荐阅读