Patrick Gold
10/24/2021, 11:47 PMsst start? If so, how is that configured?
2. How are you handling Prisma client generation and migrations inside of a CI/CD pipeline? (I’m using Github Actions)
3. I haven’t gotten to the Prisma layer deployment yet, but anything tricky to note there?thdxr
10/24/2021, 11:52 PMDATABASE_MODE: app.local ? "local" : "remote"thdxr
10/24/2021, 11:53 PMsst startthdxr
10/24/2021, 11:54 PMnode_modules so it's likely ignored. I just ran yarn prisma generate as a step before buildingthdxr
10/24/2021, 11:54 PMthdxr
10/24/2021, 11:55 PMPatrick Gold
10/24/2021, 11:55 PMthdxr
10/24/2021, 11:56 PMPatrick Gold
10/25/2021, 12:02 AMPatrick Gold
10/25/2021, 12:04 AMthdxr
10/25/2021, 12:05 AMthdxr
10/25/2021, 12:05 AMPatrick Gold
10/25/2021, 12:06 AMthdxr
10/25/2021, 12:18 AMthdxr
10/25/2021, 12:18 AMDamjan
10/27/2021, 2:28 PMPatrick Gold
10/27/2021, 4:22 PMthdxr
10/27/2021, 4:23 PMkysely so for local mode I just use the normal postgres adapter. No part of my application is aware if it's talking to data api or notPatrick Gold
10/27/2021, 4:23 PMthdxr
10/27/2021, 4:24 PMPatrick Gold
10/27/2021, 4:25 PMthdxr
10/27/2021, 4:26 PMthdxr
10/27/2021, 4:26 PMPatrick Gold
10/27/2021, 4:26 PMPatrick Gold
10/27/2021, 4:26 PMPatrick Gold
10/27/2021, 4:27 PMthdxr
10/27/2021, 4:28 PMthdxr
10/27/2021, 4:28 PMthdxr
10/27/2021, 4:29 PMPatrick Gold
10/27/2021, 4:29 PMPatrick Gold
10/27/2021, 4:29 PMPatrick Gold
10/27/2021, 5:11 PM> node_modules/pg/lib/native/client.js:4:21: error: Could not resolve "pg-native" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)
4 │ var Native = require('pg-native')
You know how to get around that?thdxr
10/27/2021, 5:12 PMthdxr
10/27/2021, 5:12 PMthdxr
10/27/2021, 5:12 PMbundle: {
nodeModules: ["kysely", "pg"],
},Patrick Gold
10/27/2021, 5:13 PMPatrick Gold
10/27/2021, 5:14 PMPatrick Gold
10/27/2021, 5:18 PMPatrick Gold
10/27/2021, 5:18 PMthdxr
10/27/2021, 5:26 PMthdxr
10/27/2021, 5:26 PMPatrick Gold
10/27/2021, 5:26 PMPatrick Gold
10/27/2021, 5:28 PMPatrick Gold
10/27/2021, 5:28 PMPatrick Gold
10/27/2021, 5:29 PMthdxr
10/27/2021, 5:33 PMPatrick Gold
10/27/2021, 6:13 PMPatrick Gold
10/27/2021, 6:14 PMthdxr
10/27/2021, 6:41 PMthdxr
10/27/2021, 6:42 PMbundle.nodeModules is basically a list of packages that are pulled from npm and added into your function's bundle. So it looks for at package.json to find the version. We should probably just copy it from node_modulesthdxr
10/27/2021, 6:42 PMPatrick Gold
10/27/2021, 6:46 PMthdxr
10/27/2021, 6:46 PMPatrick Gold
10/27/2021, 6:48 PMthdxr
10/27/2021, 6:48 PMthdxr
10/27/2021, 6:49 PMpackage.json next to sst.json - which is why it's complaining it can't find the versionPatrick Gold
10/27/2021, 6:49 PMthdxr
10/27/2021, 6:49 PMPatrick Gold
10/27/2021, 6:49 PMFrank
bundle.nodeModules, SST creates a temp folder, write a package.json with the modules specified in bundle.nodeModules, and then does a npm/yarn install. This to ensure all their dependencies are also pulled.Kevin Baker
11/07/2021, 2:47 PMthdxr
11/07/2021, 3:29 PMKevin Baker
11/07/2021, 3:46 PMthdxr
11/07/2021, 5:34 PMthdxr
11/07/2021, 5:34 PMPatrick Gold
11/07/2021, 5:37 PMKevin Baker
11/09/2021, 2:06 AMERROR BadRequestException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"tblCounter"' at line 1; Error code: 1064; SQLState: 42000Kevin Baker
11/09/2021, 2:25 AMimport { Driver, PostgresAdapter } from "kysely";
https://github.com/serverless-stack/kysely-data-api/blob/67face7b80e152d8bc2cfeeb1950c91bf003a7a3/src/data-api-dialect.ts#L1
It looks like it is bound to PostgresAdapter , but given that is the only reference to PostgresAdapter, I’m hoping I can possibly fork to a new data-api-mysql-dialect swap for MysqlAdapter.Kevin Baker
11/09/2021, 2:31 AMdata-api-postgres-dialect?
and the “mysql” one would be data-api-mysql-dialect.
Could also just do a single data-api-dialect and export both so we could use:
and keep it in one module.import {DataApiPostgresDialect, DataApiMysqlDialect } from 'kysely-data-api';
Kevin Baker
11/09/2021, 3:01 AMDataApiPostgresDialect and DataApiMysqlDialect to keep it all together.
I suppose this thread might belong on the Kysely project.thdxr
11/09/2021, 3:07 AMKevin Baker
11/10/2021, 10:15 PMthdxr
11/10/2021, 10:25 PMthdxr
11/10/2021, 10:25 PMKevin Baker
11/10/2021, 10:38 PMKevin Baker
11/10/2021, 10:42 PMKevin Baker
11/10/2021, 10:42 PMthdxr
11/10/2021, 10:43 PMKevin Baker
11/10/2021, 10:44 PMthdxr
11/10/2021, 11:14 PMthdxr
11/10/2021, 11:14 PMthdxr
11/10/2021, 11:34 PMKevin Baker
11/10/2021, 11:36 PMKevin Baker
11/11/2021, 1:38 AMthdxr
11/11/2021, 2:17 AM