第一次运行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"是前添的