../node_modules/@mapbox/node-pre-gyp/lib/util/nw-pre-gyp/index.html
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>
| <html>
| <head>
Getting this error after I installed sqlite3 with my nextron app
After this I start getting the following error
ModuleParseError: Module parse failed: Unexpected token (9:6)
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
| // This script needs to be compatible with PowerShell v2 to run on Windows 2008R2 and Windows 7.
|
> using System;
| using System.Text;
| using System.Runtime.InteropServices;
After that starts getting this error import error
Error: /home/Ankit/Projects/test/node_modules/electron/dist/resources/electron.asar/package.jsondoes not exist
> 1 | const sqlite3 = require("sqlite3").verbose()
^
Don't know how to encounter this, any help would be better, thankyou in advance...
First error get resolved if I add the following code to my next.config.js file
config.module.rules.push({ test: /.html$/, use: "html-loader", });
I resolved the second error too by adding the following code to next.config.js file
config.module.rules.push({
test: /\.cs$/,
use: "raw-loader",
});
Also used electron-builder
Also used a substitute better-sqlite3 but getting error of undefined indexOf on initialization.
I'm using: node v16.20.0 sqlite3 v5.1.6 @mapbox/node-pre-gyp v1.0.10