<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Erick Calder</title>
    <description>The latest articles on DEV Community by Erick Calder (@ekkis).</description>
    <link>https://dev.to/ekkis</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F846580%2F26012d82-e0b6-4307-ad05-b7fe1716026c.jpeg</url>
      <title>DEV Community: Erick Calder</title>
      <link>https://dev.to/ekkis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ekkis"/>
    <language>en</language>
    <item>
      <title>NextJs UUID</title>
      <dc:creator>Erick Calder</dc:creator>
      <pubDate>Wed, 13 Apr 2022 02:35:04 +0000</pubDate>
      <link>https://dev.to/ekkis/nextjs-uuid-2i6f</link>
      <guid>https://dev.to/ekkis/nextjs-uuid-2i6f</guid>
      <description>&lt;p&gt;I'm trying this&lt;br&gt;
&lt;code&gt;&lt;br&gt;
import { randomUUID } from 'crypto'&lt;br&gt;
var id = randomUUID()&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
in my NextJs app but I'm getting this error:&lt;/p&gt;

&lt;p&gt;index.js?46cb:369 Uncaught TypeError: (0 , crypto_&lt;em&gt;WEBPACK_IMPORTED_MODULE_5&lt;/em&gt;&lt;em&gt;.randomUUID) is not a function&lt;br&gt;
    at eval (index.js?bee7:8:20)&lt;br&gt;
    at Module../pages/index.js (index.js?ts=1649816623582:5680:1)&lt;br&gt;
    at Module.options.factory (webpack.js?ts=1649816623582:618:31)&lt;br&gt;
    at __webpack_require&lt;/em&gt;_ (webpack.js?ts=1649816623582:37:33)&lt;br&gt;
    at fn (webpack.js?ts=1649816623582:287:21)&lt;br&gt;
    at eval (?595a:5:16)&lt;br&gt;
    at eval (route-loader.js?ea34:235:51)&lt;/p&gt;

&lt;p&gt;it seems like the crypto library is available to middleware in NextJs (though it should be available at the browser) but that seems complicated to implement.  can anyone suggest how to generate a UUID in NextJs?&lt;/p&gt;

</description>
      <category>nextjs</category>
    </item>
  </channel>
</rss>
