Main process work with sqlite3 but not in a external js file on render process


Hello everyone, I have a question while working on the render process, it happens that I’m trying to connect to a database sqlite3, in the main process works well and in the render process in the index.html’s script tag also is working but hit the same code in an external JavaScript file that I referencing from index.html (with < script src = “app.js” > ) the code does not work and gives me an error. someone knows what is that?