简体   繁体   English

在 yocto 配方中使用 npm-install

[英]Using npm-install in a yocto recipe

I build a project for a x86 architecture with yocto sumo (2.5).我使用 yocto sumo (2.5) 为 x86 架构构建了一个项目。 I need now the support for NodeJs in version 10.15.1.我现在需要 10.15.1 版中对 NodeJs 的支持。 I wrote a new recipe where I use the precompiled NodeJs version.我写了一个新食谱,其中使用了预编译的 NodeJs 版本。 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".这工作正常,但我必须安装三个 package 和 NPM。为了测试,我使用“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?!在 yocto 配方中有什么方法可以做到这一点,这样就不需要在设备上进行额外的安装了吗?! 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您可以为所需的 npm 个软件包创建配方,然后将它们简单地安装到系统中: https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#creating-node-package-manager-npm -包

I remember it was not working perfectly with older Yocto releases.我记得它不能与旧的 Yocto 版本完美配合。 With the most recent one (Dunfell) I had no problems with that.对于最近的一个(Dunfell),我对此没有任何问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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