1

In my React web app I want to read from local sqlite db file. From what I understand it can be done via sqlite3 service package. After installing npm install sqlite3 and executing the following code I'm getting an error (Windows machine). Does anyone knows what to do?

var sqlite3 = require("sqlite3").verbose(); 
var db = new  sqlite3.Database(":memory:");

ERROR in ./node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html 1:0 Module parse failed: Unexpected token (1:0) You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders <!doctype html>

Eric
  • 1,685
  • 1
  • 17
  • 32

0 Answers0