将 IBucket 传递到 Table 属性中的桶 属性 会导致丢失 属性 错误
Passing IBucket to bucket property in Table props results in missing property error
s3Bucket = s3.Bucket.fromBucketName(this, bucketName, bucketName);
let glueTable = new glue.Table(this, tableName, {
database: glueDb,
tableName: tableName,
bucket: s3Bucket
})
当我将 s3bucket 传递给存储桶 属性 时,IDE 抛出此错误。你能帮我确定是什么导致了错误吗?
Type 'IBucket' is missing the following properties from type
'IBucket': virtualHostedUrlForObject, grantPutAcl, envts(2739)
table.d.ts(105, 14): The expected type comes from property 'bucket'
which is declared here on type 'TableProps'
当您的 cdk 模块版本不匹配时,通常会出现此错误。
尝试更新 s3 版本并粘贴到最新的 cdk 版本 (1.91.0)。
对于我的以下版本,它在 IDE 中没有给出任何错误。
"@aws-cdk/aws-s3": "1.91.0", "@aws-cdk/aws-glue": "1.91.0",
s3Bucket = s3.Bucket.fromBucketName(this, bucketName, bucketName);
let glueTable = new glue.Table(this, tableName, {
database: glueDb,
tableName: tableName,
bucket: s3Bucket
})
当我将 s3bucket 传递给存储桶 属性 时,IDE 抛出此错误。你能帮我确定是什么导致了错误吗?
Type 'IBucket' is missing the following properties from type 'IBucket': virtualHostedUrlForObject, grantPutAcl, envts(2739) table.d.ts(105, 14): The expected type comes from property 'bucket' which is declared here on type 'TableProps'
当您的 cdk 模块版本不匹配时,通常会出现此错误。 尝试更新 s3 版本并粘贴到最新的 cdk 版本 (1.91.0)。
对于我的以下版本,它在 IDE 中没有给出任何错误。
"@aws-cdk/aws-s3": "1.91.0", "@aws-cdk/aws-glue": "1.91.0",