Is anyone successfully using `typeorm 0.3` with S...
# help
k
Is anyone successfully using
typeorm 0.3
with SST? I am having trouble getting it to work and I am thinking it has something to do with how sst packages stuff 😅
t
I've been meaning to try and get it working
what's the error you're seeing?
k
So when I use
typeorm
if a function imports it for some reason I get
Copy code
5989070d-2057-4ac0-b464-a6a7d469c0ec ERROR Runtime.UnhandledPromiseRejection: TypeError: Cannot read properties of undefined (reading 'filename')
I thought that this might be because I need to add it to
nodeModules
but after I add it I get
Copy code
ERROR Runtime.UnhandledPromiseRejection: Runtime.ImportModuleError: Error: Cannot find module 'typeorm'
😅
wait… I have a suspicion, I am using workspaces and it looks like the top level node_modules does not have the typeorm dependency but one of the workspaces (backend) does…
let me try and add typeorm at the top level also
t
we need to fix that issue by spawning functions in srcPath
k
Yes that was it 🤦‍♂️
this fixed it
n
Curious about this... I'm having similar issues, with typeorm and others, also using yarn workspaces... did this behavior change? I was using srcPath and workspaces heavily pre-1.0 and don't recall ever running in to having to specify a dependency like this in the root package.json.