aws-samples / aws-iot-twinmaker-samples

Apache License 2.0
97 stars 77 forks source link

Twin Maker - Deploy an Instance - Error This CDK CLI is not compatible #79

Closed AlanTuring1988 closed 1 year ago

AlanTuring1988 commented 2 years ago

Hi all, I tried to run the guide to install the workspace wiht aws-iot-twinmaker-samples example on my AWS Cloud9 environment but I'm having trouble running the cdk deploy command. below the log:

` ec2-user:~/environment/aws-iot-twinmaker-samples/src/modules/timestream_telemetry/cdk (main) $ cdk deploy Sending build context to Docker daemon 3.584kB Step 1/9 : ARG IMAGE=public.ecr.aws/sam/build-python3.7 .... Step 3/4 : RUN yum -q list installed rsync &>/dev/null || yum install -y rsync ---> Using cache ---> e4568f4cd9fe Step 4/4 : CMD [ "python" ] ---> Running in de1146631e5f Removing intermediate container de1146631e5f ---> f0a31f91d9c2 Successfully built f0a31f91d9c2 Successfully tagged cdk-3de8e40c6b0631b1a2e8eed72754e5e4d95c87eefd46f85e40f67fbf1de6eb55:latest Bundling asset TimestreamTelemetryCdkLambdasStack/timestreamReaderUDQ/Code/Stage...

**This CDK CLI is not compatible with the CDK library used by your application. Please upgrade the CLI to the latest version.

(Cloud assembly schema version mismatch: Maximum schema version supported is 20.0.0, but found 21.0.0)** `

I report also the version about to tools needed:

` Python 3.7.10

node v16.17.0

npm v8.15.0

cdk v2.39.1 (build f188fac)

aws aws-cli/2.7.29 Python/3.9.11 Linux/4.14.290-217.505.amzn2.x86_64 exe/x86_64.amzn.2 prompt/off

`

I followed also this guide -> iot.awsworkshops.com/aws-iot-twinmaker/lab101-twinmaker-cookiefactory/ same error...

Kindly waiting for your feedback.

Tnks and Br,

RonStack commented 2 years ago

I was able to resolve the issue by running the following command. npm update -g aws-cdk

I ran cdk bootstrap again before cdk deploy.