Seems ```fields: { userId: sst.TableFieldT...
# guide
b
Seems
Copy code
fields: {
        userId: sst.TableFieldType.STRING,
        noteId: sst.TableFieldType.STRING,
      },
TableFieldType doesn't seem to exist anymore?
s
Hmm, I'm seeing this too
Not sure why this is, but you can get around the issue by just using "string"
Copy code
const table = new sst.Table(this, "Notes", {
      fields: {
        userId: "string",
        noteId: "string"
      },
      primaryIndex: { partitionKey: "noteId", sortKey: "userId" },
    });
j
Same here, was checking the example from the guide and got the following error on build: Cannot read properties of undefined (reading ‘STRING’) Setting it to “string” worked, thnx @Seth Geoghegan
s
This issue is related to the new 1.0 beta release. For the time being, consider using 0.69.x https://serverless-stack.slack.com/archives/C01JG3B20RY/p1649166093784879
f
@Janko Tomšič @Seth Geoghegan yeah change the version for
@serverless-stack/cli
and
@serverless-stack/resources
to version
0.69.4
in ur package.json and run
npm/yarn install
.
We published the v1.0 beta to the
latest
npm tag, and when u run
create-serverless-stack
, it picks up the beta release.
Sorry about that.
It’s been reverted,
latest
points to
0.69.4
now
a
What's the suggested usage now that v1.0 is out? Just a string literal
"string"
or is there a
TableFieldType.STRING
equivalent somewhere?