I've spent the better part of a day trying to upgr...
# help
k
I've spent the better part of a day trying to upgrade from 0.40.5 -> ^0.46.1 and keep running into issues with function bundling behavior. We currently have a folder with our go lambda code in one directory where the sst.json lives. We have another node lambda up a level in another folder. The sst.Function props for the path are:
Copy code
srcPath: '../js/mylambda',
handler: 'src/index.handler'
This seems to work fine in live debug mode (as well as with 0.40.5 if we drop srcPath and set handler to full path), but when this is actually deployed, the handler set on the lambda is:
../js/mylambda/src/index.handler
and it looks like I have a package.json and package-lock.json and a node_modules folder but no source code. I need some guidance on the quickest way to get this working again 🙏
t
Ah this is because of changes to our deployment bundle that preserves the folder structure in the bundle for things like sourceMaps
SST doesn't currently support structures where sst.json is not in the root of your repo
k
ok thanks. Just to clarify, the only way for us to upgrade is to restructure our sst configuration? Also, do you know if this would restrict us from having a sub-projects with an independent stack, as long as resources aren't referenced from above the sub-project folder? we have a monorepo, and having only a single sst "app" is pretty restrictive
t
You can have multiple sst projects in a monorepo
The only restriction is you cannot reference code in a stack from above the sst.json
k
ok, great - that's what I was hoping
t
We do need to do some restructuring to support configurations like yours but right now it's not supported
k
yeah, we definitely want to be able to avoid pushing things up like this, but I think we can make it work for now