adamgibbons / ics

iCalendar (ics) file generator for node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

crypto.randomBytes is not a function

berenteb opened this issue · comments

I am trying to use the createEvent function, and a TypeError showed up in the console breaking everything. If I comment out this part of the implementation, it goes away. I am using TypeScript.

If you are using react-native or similar environments that do no support the crypto API out of the box, try to install react-native-get-random-values polyfill and import it somewhere before this package import 'react-native-get-random-values';

For more info see here

Should be resolved by switching from uuid to nano.