Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

277
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda