NPM package recipe, npm not found


Bel Hadj Salem Talel <bhstalel@...>
 

Hi,

I'm trying to make a recipe for an NPM package.
The source files are local.
Here is my recipe:

LICENSE="CLOSED"
SRC_URI+="file://sense-web_${PV].zip"
S=${WORKDIR}
DEPENDS+="nodejs"
do_compile(){
  export HOME=${S}
  npm install
  npm run-script build
}

The following error appears:

Log data follows:
| DEBUG: Executing shell function do_compile
| /media/talel/data/menzu-zeus/menzu/tmp/work/aarch64-poky-linux/sense-web/1.0-r0/temp/run.do_compile.11622: 107: /media/talel/data/menzu-zeus/menzu/tmp/work/aarch64-poky-linux/sense-web/1.0-r0/temp/run.do_compile.11622: npm: not found
| WARNING: exit code 127 from a shell command.
| ERROR: Execution of '/media/talel/data/menzu-zeus/menzu/tmp/work/aarch64-poky-linux/sense-web/1.0-r0/temp/run.do_compile.11622' failed with exit code 127:
| /media/talel/data/menzu-zeus/menzu/tmp/work/aarch64-poky-linux/sense-web/1.0-r0/temp/run.do_compile.11622: 107: /media/talel/data/menzu-zeus/menzu/tmp/work/aarch64-poky-linux/sense-web/1.0-r0/temp/run.do_compile.11622: npm: not found
| WARNING: exit code 127 from a shell command.
|

I did the same steps in devshell of nodejs and everything is correct.
I tried to add the recipe with devtool , devtool add sense-web_1.0.zip but it failed.

Any ideas?
Thanks, Talel

Join {yocto@lists.yoctoproject.org to automatically receive all group messages.