Trying to add a default removal policy in a TypeSc...
# sst
c
Trying to add a default removal policy in a TypeScript SST project and getting this error. I’m still pretty green in using TS. Am I missing something basic to get this to work?
lib/index.ts
Copy code
export default function main(app: <http://sst.App|sst.App>): void {

  if (app.stage === "dev") {
    app.setDefaultRemovalPolicy(RemovalPolicy.DESTROY);
  }

...
error
Copy code
Property 'setDefaultRemovalPolicy' does not exist on type 'App'.
t
Are you on latest sst?
c
Good question. Looks like I’m on 0.40.1
Is best way to update to nuke node modules and reinstall SST?
t
we have an
sst upgrade
command
Can do
yarn sst upgrade
That feature landed in v0.40.2
so close!
c
Ah, if I only I’d scrolled down a bit more on that page 😂 Thanks Dax, as always.