Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
Imported the uuid library and tried to log it out using command, but it shows:TypeError: string is not a function

I ran the code using command prompt and it reported: "string is not a function".

here is my code:

const uuid = require('uuid/v1');
const myaddress = uuid().split('-').join('');
console.log(myaddress)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Assuming you are using this package https://www.npmjs.com/package/uuid then you likely need to specify what part of the API (or version) you are wanting to use. So using version 4 would look something like this:

const { v4: uuidv4 } = require('uuid');
const myaddress = uuidv4().split('-').join('');
// output might look like "00207ec4afeb4e2ebed0fb9d9d0a5ef2"

https://npm.runkit.com/uuid is a simple online tool to test the code.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!