简体   繁体   中英

Using npm-install in a yocto recipe

I build a project for a x86 architecture with yocto sumo (2.5). I need now the support for NodeJs in version 10.15.1. I wrote a new recipe where I use the precompiled NodeJs version. That works fine but I must install three package with the NPM. For testing I installed it on the device manually with "npm install -global bower coffeescript gulp". Is there any way to do that in the yocto recipe so that the extra installation on the device is not necessary?! Thanks for all tipps and help!

BR Harald

You could create recipes for npm packages you need and simply install them into the system: https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#creating-node-package-manager-npm-packages

I remember it was not working perfectly with older Yocto releases. With the most recent one (Dunfell) I had no problems with that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM