我正在尝试构建使用 AWS Javascript SDK v3 的项目。这里我的tsconfig.json
{
"compilerOptions": {
"target":"ES2020",
"module": "commonjs",
"lib": ["es2020"],
"outDir": "dist",
"resolveJsonModule": true,
},
"exclude": [
"coverage",
"node_modules",
"dist",
"tests"
]
}
Run Code Online (Sandbox Code Playgroud)
这是我得到的构建错误示例(为了简洁起见,我已经删除了一些输出):
node_modules/@aws-sdk/client-s3/types/models/models_1.d.ts:727:23 - error TS2304: Cannot find name 'ReadableStream'.
node_modules/@aws-sdk/client-s3/types/models/models_1.d.ts:727:40 - error TS2304: Cannot find name 'Blob'.
node_modules/@aws-sdk/util-dynamodb/types/models.d.ts:19:86 - error TS2304: Cannot find name 'File'.
Run Code Online (Sandbox Code Playgroud)
我不明白为什么这会给我这样的问题,即使我已经安装了@types/node支持节点输入的模块