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

158
Vistas
Failed to load resource: the server responded with a status of 404 (Not Found) Sqlite3.js

I am trying to load an sqlite3 package to the browser using requirejs module and and it won't load.

This is the code of the JavaScript file:

requirejs(['sqlite3'], function (sqlite3) {
// const sqlite3 = require('sqlite3').verbose();
let db = new sqlite3.Database('./db/main.db');
const button = document.querySelector("#btnOnclick");
const fname = document.querySelector("#fname");
button.addEventListener("click", function onclick(event) {


  db.run(`INSERT INTO langs(name) VALUES(?)`, [fname], function(err) {
    if (err) {
      return console.log(err.message);
    }
    // get the last insert id
    console.log(`A row has been inserted with rowid ${this.lastID}`);
  });
db.close();

});
});

and it gives me theis error in the browser console:

screenshot of the browser console

Note:

I am using nodeJs and html & css for this project and the code works fine in my machine but on the browser gives me this error

about 4 years ago · Juan Pablo Isaza
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