upgrade CDK version
Hi team,
I'm trying to update my CDK version from V1 to V2
in my packege.json, I changed the version from "^1.153.1" to "^2.25.0"
but I have compilation errors when doing npm install ... for example
npm ERR! code ETARGET
npm ERR! notarget No matching version found for @aws-cdk/aws-apigatewayv2-authorizers@^2.25.0.
npm ERR! notarget In most cases you or one of your dependencies are requesting
npm ERR! notarget a package version that doesn't exist.
how can I keep my existing code for my CDK stacks working with the V2 version or should I rewrite the CDK code?
Thank you :)
In terms of general upgrade, you will find that during migration from CDKv1 to CDKv2, some constructs will have changed subtly. for this reason, it is sometimes required to re-write a small amount of code (you often find that this is simpler in CDKv2 actually).
For your specific question, you can see that https://docs.aws.amazon.com/cdk/api/v1/docs/aws-apigatewayv2-authorizers-readme.html still does exist. (https://docs.aws.amazon.com/cdk/api/v2/docs/aws-apigatewayv2-authorizers-alpha-readme.html) Please note that this is an Alpha version and likely to change still.
You'll need to reference this version as "aws_cdk.aws_apigatewayv2_authorizers_alpha" - that's likely why it's not working for you here though (without seeing your specific use-case).
Hope this helps :)
Relevant questions
How do I get lightsail's php8 version to change from to php7.4. I'm using lightsail wordpress, but his version is too high and the migration causes incompatibility errors.
asked a month agodeploy new cdk Aurora Cluster
Accepted Answerasked a month agoHow / Where do I upgrade my instance's PostgreSQL Version?
Accepted Answerasked 2 months agoUpgrade Ubuntu AMI version from 16.04 to 22.04
asked a month agoupgrade CDK version
asked a month agoIssue with CDK version v1 running on CICD image server
asked 18 days agoWhich node version is compatible with CDK v2?
asked 19 days agoUnable to upgrade from version 5.7 to 8 MySQL
Accepted Answerasked 6 months agoCDK alpha modules
Accepted Answerasked 6 months agoHow to upgrade Mac OS version on mac1.metal instance?
asked a month ago