sst.dev icon indicating copy to clipboard operation
sst.dev copied to clipboard

uuid : TypeError: Cannot read property ‘v1’ of undefined

Open jmoors opened this issue 5 years ago • 1 comments

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.

jmoors avatar Mar 11 '20 00:03 jmoors

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

jayair avatar Mar 30 '20 21:03 jayair