Folks, a quick heads-up that the <postgres example...
# guide
n
Folks, a quick heads-up that the postgres example has quite a few issues. I've fixed a few along the way but now I'm into type errors within KyselyTypeGenerator.js. It looks like the base setup has been changed to typescript but the rest of the content hasn't.
f
Hey @Neil Balcombe, taking a look right now.
n
I've literally just run into the same issue with the KyselyTypeGenerator in a js project that I've started from scratch, so it's not a ts issue.
f
ic..
trying it now..
@Neil Balcombe just confirming, is this the error u r getting?
Copy code
==========================
 Starting Live Lambda Dev
==========================

SST Console: <https://console.serverless-stack.com/zzz-graphql-apollo/frank/local>

TypeError: Cannot read properties of undefined (reading 'data')
    at file:///Users/frank/Sites/fwang/zzz-graphql-apollo/node_modules/@serverless-stack/core/dist/cli/KyselyTypeGenerator.js:12:89
    at Array.map (<anonymous>)
    at Object.cb (file:///Users/frank/Sites/fwang/zzz-graphql-apollo/node_modules/@serverless-stack/core/dist/cli/KyselyTypeGenerator.js:11:14)
    at Object.publish (file:///Users/frank/Sites/fwang/zzz-graphql-apollo/node_modules/@serverless-stack/core/dist/cli/Bus.js:18:21)
    at publishMetadata (file:///Users/frank/Sites/fwang/zzz-graphql-apollo/node_modules/@serverless-stack/core/dist/cli/StacksBuilder.js:153:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
n
Exactly that 👍
f
working on a fix
@Neil Balcombe fixed in v1.2.13.
I also noticed a couple issues with the example, just re-wrote the it https://serverless-stack.com/examples/how-to-use-postgresql-in-your-serverless-app.html
You can either update the SST version in
package.json
, or start from scratch and run
npm init sst
to create a new project.
n
Amazing, thanks. Will try again and let you know.
It's fixed for me now, thank you 👍