Carlos Daniel
04/19/2022, 11:25 PMimport * as sst from '@serverless-stack/resources';
export default class Table extends sst.Stack {
constructor(scope, id, props) {
super(scope, id, props);
this.table = new sst.Table(this, 'text', {
fields: {
link: sst.TableFieldType.STRING
},
primaryIndex: { partitionKey: 'link' }
});
this.connectionsTable = new Table(this, 'connections', {
fields: {
id: sst.TableFieldType.STRING,
},
primaryIndex: { partitionKey: 'pk', sortKey: 'sk' },
});
}
}
I added the this.connectionsTable
and it broke. Idk if I’m doing something wrongCarlos Daniel
04/19/2022, 11:26 PMRangeError: Maximum call stack size exceeded
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:220:23)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
at Node.tryGetContext (/Users/carlos/www/carlospad/node_modules/constructs/src/construct.ts:224:42)
I’m going to update to v1.0.0 to see if it changes anythingFrank
pk
and sk
are not defined in fields
Carlos Daniel
04/20/2022, 1:58 PMnew Table()
instead of new sst.Table()
and since my class is called Table, I think it started a loop