You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using nw-angular-cli-example as a boilerplate for angular and nwjs project. I'm trying to add backend into the project. For that many tutorial suggests I should go like Angular->Express->SQLite. In which Angular is used for UI, Express is used for building an API and the api endpoints perform read write operations on the SQLite. I'm using node-sqlite3 for this project. When I try building it with nw-gyp using the instruction provided in node-sqlite3, the build is successful. However, when I try importing sqlite3 in my project I get the following error.
The manual build is successful and the sqlite3 directory structure in node_modules folder is same as one would expect it to be after a manual build.
NWJS Version : 0.46.0
Operating System : MacOS 10.15.4
NodeJS version 14.2.0
Expected behavior
The sqlite3 should be working without looking for node-gyp built package.
I used the following command to build the sqlite3 for my laptop npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.46.0 --save
The text was updated successfully, but these errors were encountered:
TheJaredWilcurt
changed the title
NwJS + Sqlite3 + Angular 9: can't run node-main script which contains sqlite3.
NW.js + Sqlite3 + Angular 9: can't run node-main script which contains sqlite3.
May 21, 2020
I'm using nw-angular-cli-example as a boilerplate for angular and nwjs project. I'm trying to add backend into the project. For that many tutorial suggests I should go like Angular->Express->SQLite. In which Angular is used for UI, Express is used for building an API and the api endpoints perform read write operations on the SQLite. I'm using node-sqlite3 for this project. When I try building it with nw-gyp using the instruction provided in node-sqlite3, the build is successful. However, when I try importing sqlite3 in my project I get the following error.
The manual build is successful and the sqlite3 directory structure in node_modules folder is same as one would expect it to be after a manual build.
NWJS Version : 0.46.0
Operating System : MacOS 10.15.4
NodeJS version 14.2.0
Expected behavior
The sqlite3 should be working without looking for node-gyp built package.
Actual behavior
The error as described in the first image.
How to reproduce
npm install sqlite3 --build-from-source --runtime=node-webkit --target_arch=x64 --target=0.46.0 --save
The text was updated successfully, but these errors were encountered: