Using crypto.randomUUID() in "node" environment.
I notice that the crypto.randonUUID() throw error when we declare the function with "use node". Are there any alternatives?
1 Reply
Convex's node is v18, that method was added in v19
here's a couple of alternatives from good ol' SO: https://stackoverflow.com/a/73205206/1556245
(uuid.v4() and
crypto.randomBytes()
)