Seems like my function defaults (vpc, layers) are ...
# help
m
Seems like my function defaults (vpc, layers) are not being propagated to my lambda functions created via
API
I set the defaults before instantiating the
APIs
. it's all one stack SST 0.69.5
t
are you using yarn?
or npm?
m
npm
t
Can you check your package-lock.json and see if there's any reference to
@serverless-stack-slack/resources
that's a version you wouldn't expect
m
doesn't look like it
in layers.ts i have
app.addDefaultFunctionLayers([prismaLayer]);
but my layers aren't in the VPC and don't have the layer
t
ahh ok this is actually a bug - when you add app level defaults inside the stack it doesn't get applied to the current stack, only future stacks
did you intend this to be an app level default or is a stack level default fine?
m
stack level is fine
t
switch it to
this.setDefault...
m
ok
thanks
still trying to get prisma set up... added:
Copy code
this.setDefaultFunctionProps({
      vpc,
      runtime: "nodejs12.x",
      securityGroups: [defaultLambdaSecurityGroup],
      bundle: {
        copyFiles: [{ from: "prisma/schema.prisma", to: "schema.prisma" }],
      },
    });
but I don't see schema.prisma in the bundle anywhere
seems like bundle.copyFiles is ignored
t
do you set any bundle props later? bundle isn't merged it's overwritten
m
yeah i do... it's overwritten? 😢
ok
thanks
i probably need to copy it into src/