【问题标题】:Ridiculous error trace in tsc. How to add more verbose?tsc 中可笑的错误跟踪。如何添加更多详细信息?
【发布时间】:2021-05-31 18:37:36
【问题描述】:

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

$ 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

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

【问题讨论】:

    标签: typescript compiler-errors compilation


    【解决方案1】:

    试试 npm run build -- --verbose

    检查:

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

    【讨论】:

      猜你喜欢
      • 2015-02-06
      • 1970-01-01
      • 1970-01-01
      • 2016-01-02
      • 1970-01-01
      • 2017-08-17
      • 1970-01-01
      • 2015-01-26
      • 1970-01-01
      相关资源
      最近更新 更多