John Kor
05/30/2022, 8:59 PMjohn@pop-os:~/Development/edvisor-io/pricing-lambda$ yarn sst build
yarn run v1.22.15
$ /home/john/Development/edvisor-io/pricing-lambda/node_modules/.bin/sst build
Using stage: john
Preparing your SST app
Synthesizing CDK
Error: There was a problem transpiling the Lambda handler: ✘ [ERROR] Could not resolve "@nestjs/websockets/socket-module"
node_modules/@nestjs/core/nest-application.js:18:115:
18 │ ...ocket-module', () => require('@nestjs/websockets/socket-module'));
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can mark the path "@nestjs/websockets/socket-module" as external to exclude it from the bundle, which will remove this error. You can also surround this "require" call with a try/catch block to handle this failure at run-time instead of bundle-time.
.. along with other errors regarding other modules (ie. class-transformer
, class-validator
, etc..)thdxr
05/30/2022, 9:08 PMJohn Kor
05/30/2022, 9:24 PMthdxr
05/30/2022, 9:26 PMstacks/index.ts
- if so you can try turning it off or update this to include all the packages it's complaining aboutJohn Kor
05/30/2022, 9:28 PMJohn Kor
05/30/2022, 10:25 PMsequelize-typescript
to define my sequelize models. this relies on some typescript inference magic to define things. it mostly works except i need to explicitly define the column data-types because otherwise it seems to fail...
for example, this does not work (but does outside of the SST context):
@Table({
tableName: 'user',
modelName: 'User',
})
export class User extends Model {
@PrimaryKey
@Column({
field: 'user_id',
})
userId: number
}
however, this does work:
@Table({
tableName: 'user',
modelName: 'User',
})
export class User extends Model {
@PrimaryKey
@Column({
field: 'user_id',
type: DataType.INTEGER //must be explicit
})
userId: number
}
John Kor
05/30/2022, 10:26 PMkeepNames: true
config... both didnt seem to fix the above issue 🤷thdxr
05/30/2022, 10:51 PMJohn Kor
05/30/2022, 10:52 PMsequelize-typescript
😞thdxr
05/30/2022, 10:52 PMkysely
+ kysely-data-api
as setup here: https://github.com/serverless-stack/ideal-stack-preview/blob/master/backend/core/article.tsJohn Kor
05/30/2022, 10:54 PMHitesh Balwani
05/31/2022, 10:23 AMJohn Kor
05/31/2022, 5:45 PM"emitDecoratorMetadata": true,
"experimentalDecorators": true,
i only had it in the ./backend/tsconfig.json
file but not in the ./tsconfig.json
file