aws-solutions / smart-product-solution

The Smart Product Solution is a customer deployable reference architecture to help manufacturers to jumpstart development of innovative connected/smart product services.
Apache License 2.0
28 stars 20 forks source link

SmartProductCDKToolkit - Unable to compile TypeScript #3

Closed alexandredavi closed 4 years ago

alexandredavi commented 4 years ago

TypeScript compilation error after updated cdk to 1.18.0 version.

Toolkit stack: SmartProductCDKToolkit
--
130 | ⨯ Unable to compile TypeScript:
131 | lib/smart-product-owner-web-app.ts(112,11): error TS2322: Type '{ s3BucketSource: s3.Bucket; originAccessIdentityId: string; }' is not assignable to type 'S3OriginConfig'.
132 | Object literal may only specify known properties, but 'originAccessIdentityId' does not exist in type 'S3OriginConfig'. Did you mean to write 'originAccessIdentity'?
133 |  
134 | Subprocess exited with error 1

Rolling back to cdk 0.39.0 version works fine.

beomseoklee commented 4 years ago

Thanks for contacting, and we are aware of this issue, and we are going to fix this one soon. The issue is due to the breaking changes of CDK 1.19. You can see the breaking changes here.

As a workaround, you can lock the CDK version to 1.18 on your CodeCommit repository package.json.

  "dependencies": {
    "@aws-cdk/aws-apigateway": "1.18.0",
    "@aws-cdk/aws-cloudfront": "1.18.0",
    "@aws-cdk/aws-cognito": "1.18.0",
    "@aws-cdk/aws-dynamodb": "1.18.0",
    "@aws-cdk/aws-iam": "1.18.0",
    "@aws-cdk/aws-iot": "1.18.0",
    "@aws-cdk/aws-iotanalytics": "1.18.0",
    "@aws-cdk/aws-lambda": "1.18.0",
    "@aws-cdk/aws-s3": "1.18.0",
    "@aws-cdk/aws-sns": "1.18.0",
    "aws-cdk": "1.18.0",
    "uuid": "^3.3.2"
  }
beomseoklee commented 4 years ago

Thanks for waiting, and the latest update we released contains the fix of this issue, so you can use the latest template to launch the solution.