Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

212
Views
Uncaught TypeError: Failed to resolve module specifier "uuid" in Javascript

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 here.

When I follow the instruction and put

import { v4 as uuidv4 } from 'uuid';
uuidv4();

The browser tells me "Uncaught TypeError: Failed to resolve module specifier "uuid". Relative references must start with either "/", "./", or "../"." I'm guessing maybe I need to import some .js file from "node_module", 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.

7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.