<https://serverless-stack.slack.com/archives/C01HQ...
# sst
c
https://serverless-stack.slack.com/archives/C01HQQVC8TH/p1630406851147400 hey I got this error back again on v0.68.0 when creating a new table on DDB
Copy code
import * 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 wrong
Error:
Copy code
RangeError: 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 anything
f
Hey @Carlos Daniel I’m not sure if this is related, but it seems
pk
and
sk
are not defined in
fields
c
hey actually no, the problem was that I was using
new Table()
instead of
new sst.Table()
and since my class is called Table, I think it started a loop