[yocto] [OE-core] npm offline build for yocto

Jan Kiszka jan.kiszka at siemens.com
Thu Mar 7 03:50:28 PST 2019

On 07.03.19 11:25, Josef Holzmayr wrote:
> Hi Jan,
> On Thu, Mar 07, 2019 at 10:37:26AM +0100, Jan Kiszka wrote:
>> Hi Michael,
>> I found your progress report (and unanswered question) on that topic in http://lists.openembedded.org/pipermail/openembedded-core/2018-April/268639.html.
>> Did this effort go further?
>> I just ran into it again while updating
>> https://github.com/siemens/meta-iot2000 to Node.js >v6. I also played with
>> prefilling the cache, but likely in the wrong way.
> We've had our share of fun ourselves by now, especially with the
> event-stream module being hijacked and removed. To my knowledge none of

A mess...

> the existing nodejs package managers (npm, yarn, ...) do support pure
> fetching neither explicit caching. The only thing that seems to be
> mostly working fine is using an explicit caching proxy like lazy-npm to
> externally cache the remote repositories.

Fetching is already implemented by bitbake. Now the question is if we can use 
native npm to install offline.

My understanding was that "npm cache add <tarball>" could be a path, though 
there were at least some issues in the past: 
https://github.com/nodejs/help/issues/944. What only I tried so far was "npm 
cache add <folder>" but that didn't work with npm 6.4.1. Maybe I should also 
check the tarball path. But that would mean unpacking the dependencies into 
${S}/node_modules becomes pointless (well, it already is).


Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

More information about the yocto mailing list