Open isaac-scarrott opened 2 weeks ago
Please let me know if you wish me to create a minimal repository to reproduce this issue
We made some changes to this recently, can you update your CLI?
Also have a look at how our monorepo example has it: https://github.com/sst/ion/blob/dev/examples/aws-monorepo/packages/functions/sst-env.d.ts & https://github.com/sst/ion/blob/dev/examples/aws-monorepo/sst-env.d.ts
Lmk if that helps.
Hey @jayair, upgrading didn't help unfortunately and I'm following the examples correct. I believe it's this commit and specifically this line that has caused this to happen.
I believe the fix would be to add export {}
, to the line after this one would fix this issue. Similar to how there is this line here for the root sst-env.d.ts
that enables all of my non cloudflare resources to pass the type checks.
I would test this locally and raise a PR however, I can't work out how to run the CLI locally so if I could get some guidance on how to run it locally or someone else could fix it that would be great
Hey,
I'm seeing an issue with
sst-env.d.ts
in my monorepo. I have twosst-env.d.ts
files being generated, one in the root and one in my cloudflare worker folder/workspace.The root
sst-env.d.ts
seems to be correct and look something like the following:However, the
sst-env.d.ts
generated in my app/workspace folder seems to be causing an issue as it does not have export {} at the end and is causing the error'Resource' only refers to a type, but is being used as a value here when attempting to reference the resource
Also note that this is a project deployed to cloudflare.