sst.dev
sst.dev copied to clipboard
uuid : TypeError: Cannot read property ‘v1’ of undefined
Whilst following the code examples for the create API I was getting a “TypeError: Cannot read property ‘v1’ of undefined” error.
After investigation it seems there is a new version 7.x version of the uuid package has been released in the last few weeks, which has removed the default export.
https://github.com/uuidjs/uuid#upgrading-from-uuid3
Therefore the code examples need to be updated to using the new import syntax:
import { v1 as uuidv1 } from 'uuid';
noteId: uuidv1(),
Thanks to untilawesome on the forum for documenting this issue.
Hi there, we'll be updating this. For now, we pinned the uuid version to 3.4.0
https://serverless-stack.com/chapters/setup-the-serverless-framework.html#install-nodejs-packages