pff - not having a great night lol... Preparing y...
# help
k
pff - not having a great night lol... Preparing your SST app ✘ [ERROR] Could not resolve "@aws-cdk/aws-apigatewayv2" stacks/ApiStack.js331: 3 │ import { CorsHttpMethod } from "@aws-cdk/aws-apigatewayv2"; ╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can mark the path "@aws-cdk/aws-apigatewayv2" as external to exclude it from the bundle, which will remove this error.
f
Which version of SST r u using?
k
0.69.2
f
Ah u should have this in ur package.json
Copy code
"@aws-cdk/aws-apigatewayv2-alpha": "2.15.0-alpha.0"
And u should import
Copy code
import * as apig from "@aws-cdk/aws-apigatewayv2-alpha"
Btw, where did u get the this code
import { CorsHttpMethod } from "@aws-cdk/aws-apigatewayv2";
?
k
im not sure, but it was to do with solving using cors because v1 wasnt working lol
I was doing cors: { allowOrigins: [process.env.ORIGINS], allowHeaders: ["*"], allowMethods: [CorsHttpMethod.POST, CorsHttpMethod.GET, CorsHttpMethod.PUT, CorsHttpMethod.DELETE],
but now CorsHttpMethod doesnt work with the changed reference
nvm apig.Cors... ta
f