Adding sqlite3 support on electron

Hi,

I have installed electron by referring following links, and now I need sqlite3 package to my application, so I tried to install ‘npm install --save sqlite3’ or ‘npm install --save sqlite3@3.1’ and got build error.
Also my rootfs doesn’t have gcc and other tools, only 512MiB NAND flash on our imx6 collibiri SOC based custom board.

Copied the error logs here.

https://developer.toradex.com/knowledge-base/electron-framework

How can I resolve this issue ? any suggestions ?
Is it possible to install sqlite3 package for electron and can be installed through opkg manager ?

Any help ?
Also I need to add serialport module too.

Greetings @Titus_Stalin!

I’ve known customers with issues on adding sqlite3 on Electron. Apparently there’s no pre-built binary for armv7, so you either have to install the build tools (gcc, make, etc) on your image or somehow cross-compile (it’d look something like npm install --sqlite=/usr/lib --build-from-source --target_arch=arm) and deploy it to your rootfs.
You would need to do the same for the serialport module if you stumble upon the same error.