第一次运行express typeorm的问题?

https://github.com/typeorm/ty...

typeorm的官方express,typescript,typeorm的项目,下载下来运行的时候提示下面的问题:

 Property 'asyncIterator' does not exist on type 'SymbolConstructor'.

4288     [Symbol.asyncIterator](): AsyncIterableIterator<T>;
                 ~~~~~~~~~~~~~

node_modules/typeorm/driver/mongodb/typings.d.ts:4288:31 - error TS2304: Cannot find name 'AsyncIterableIterator'.

4288     [Symbol.asyncIterator](): AsyncIterableIterator<T>;
                                   ~~~~~~~~~~~~~~~~~~~~~

image.png

怎么解决?

阅读 1.3k
1 个回答

在tsconfig.json里加上这个

"compilerOptions": {
        "lib": ["es5", "es6", "esnext.asynciterable", "es2015"],
}
其中的"esnext.asynciterable", "es2015"是前添的
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进