title: Uncaught TypeError: Failed to resolve module specifier "uuid" in Javascript
body: <p>This is probably a very simple question, but I can't figure it out even after reading many articles. I don't know any Node.js, and I just want to use the uuid generator from <a href="https://www.npmjs.com/package/uuid" rel="nofollow noreferrer">here</a>.</p>
  <p>When I follow the instruction and put</p>
  <pre><code>import { v4 as uuidv4 } from 'uuid';
  uuidv4();
  </code></pre>
  <p>The browser tells me &quot;Uncaught TypeError: Failed to resolve module specifier &quot;uuid&quot;. Relative references must start with either &quot;/&quot;, &quot;./&quot;, or &quot;../&quot;.&quot;
  I'm guessing maybe I need to import some .js file from &quot;node_module&quot;, so I opened the node_module and only see a lot of files that I don't understand at all. This is very frustrating, and the same problem may occur when I try to use any other npm modules in the future.</p>