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

304
Views
¿Cómo soluciona require() no está definido en JS si no hay archivos ni HTML?

Estoy tratando de hacer un generador de texto de IA (usando una API ) y dice " ReferenceError: require is not defined ", y no tengo un paquete JSON o HTML fuera de él porque lo estoy ejecutando desde un Sna ¡pags! Reportero de funciones de JavaScript. ¿Algunas ideas? He pensado en poner una función en el cuadro de variables, pero no sé qué va ahí . Código:

 const deepai = require('deepai'); // OR include deepai.min.js as a script tag in your HTML

deepai.setApiKey('quickstart-QUdJIGlzIGNvbWluZy4uLi4K');

(async function() {
 var resp = await deepai.callStandardApi("text-generator", {
 text: "YOUR_TEXT_HERE",
 });
 console.log(resp);
})()

almost 4 years ago · Santiago Trujillo
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!