Nodejs app with node-sqlite3 cross-compile errors

I am using BSP 2.8.7, and I created a recipe to my nodejs application using TipsAndTricks/NPM and aparently everything compiles good, but fail with the error below:

WARNING: smar-api-1.0-r0 do_package_qa: QA Issue: non -staticdev package contains static .a library: smar-api-sqlite3 path '/work/armv7at2hf-neon-angstrom-linux-gnueabi/smar-api/1.0-r0/packages-split/smar-api-sqlite3/usr/lib/node_modules/smar-api/node_modules/sqlite3/build/Release/sqlite3.a'
non -staticdev package contains static .a library: smar-api-sqlite3 path '/work/armv7at2hf-neon-angstrom-linux-gnueabi/smar-api/1.0-r0/packages-split/smar-api-sqlite3/usr/lib/node_modules/smar-api/node_modules/sqlite3/build/Release/' [staticdev]
ERROR: smar-api-1.0-r0 do_package_qa: QA Issue: /usr/lib/node_modules/smar-api/node_modules/sqlite3/tools/docker/architecture/linux-arm64/Dockerfile contained in package smar-api-sqlite3 requires /bin/echo, but no providers found in RDEPENDS_smar-api-sqlite3? [file-rdeps]
ERROR: smar-api-1.0-r0 do_package_qa: QA run found fatal errors. Please consider fixing them.
ERROR: smar-api-1.0-r0 do_package_qa: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/vbalestero/df63ng/df63ng-imx6-bsp-287/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/smar-api/1.0-r0/temp/log.do_package_qa.17182
ERROR: Task (/home/vbalestero/df63ng/df63ng-imx6-bsp-287/build/../layers/meta-smar-df63ng/recipes-devtools/nodejs/ failed with exit code '1'

This is my recipe:

SUMMARY = "Webserver hello world from B2ML"

# Add missing RDEPENDS (should be implemented by npm class)
RDEPENDS_${PN} += "nodejs"

PV = "1.0.0"
##SRC_URI = "git:///home/vbalestero/build/webserver-helloworld.git;branch=main;protocol=git 
SRC_URI = "git://;branch=main;protocol=git \
#SRCREV = "1d0a1d36c96e45e7ddb3a870e5ef3c3de891f485"
#SRC_URI[md5sum] = "b9d79706255619bd45629331c8f13b6d"
#SRC_URI[sha256sum] = "230678dbe59ea6087d8c90233e098f0c33e72d71aa13c64b4607862d940d8349"

inherit npm

# npm class sets ${S} so we need to override it. This has to be done after 'inherit npm' directive
S = "${WORKDIR}/git"

# You must go through dependent modules extract licences and add them here.
# This snippet shows a subset
LIC_FILES_CHKSUM = "file://LICENSE;md5=0703cf6b93b62996588714ca1e28cfc0"


Is there anyone to help me with this urgently please?

Hi @vbalestero,

The issue is in your recipe, to solve the issue you need to insert RDPENDS variable, another alternative is using the INSANE_SKIP variable, but to use this you have to make sure that the needed package is being provided by another package.

Best regards,

Daniel Morais

Hi @daniel_m.tx,

I already tried to insert “bash” into RDEPENDS variable in my recipe RDEPENDS_${PN} += “bash nodejs”, since the error is about “/bin/echo” when calling do_package_qa function, but it does not work.

I don’t know why do_package_qa is trying to execute “/usr/lib/node_modules/smar-api/node_modules/sqlite3/tools/docker/architecture/linux-arm64/Dockerfile”.

I also tried RDEPENDS_${PN}-sqlite3 = “bash” im my recipe, but no luck.

@vbalestero, what is the structure of your recipe? Are you using symlinks?

Thanks @andrecurvello.tx.

I’ve already fixed it using another method, now I can cross-compile npm packages and deploy it to our device. Now I’ve to found out at how to deploy it inside our custom BSP image.

Perfect. Thanks for the feedback.