<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Hi Brendan,<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Thanks for reply.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I'm trying to use npm class with this layer <a href="https://github.com/imyller/meta-nodejs">https://github.com/imyller/meta-nodejs</a><br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">For example, I changed this recipe <a href="https://github.com/imyller/meta-nodejs/blob/master/recipes/grunt/grunt-cli_1.1.0.bb">https://github.com/imyller/meta-nodejs/blob/master/recipes/grunt/grunt-cli_1.1.0.bb</a> to use npm class provided by oe-core and removed all classes from meta-nodejs. <br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I can install grunt-cli If I remove S = ${WORKDIR}/npmpkg and <br> --no-registry option.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I put PREFERRED_VERSION_nodejs-native on local.conf to set nodejs version and I tried with all versions available on meta-nodejs and meta-oe version, that has patch to enable --no-registry.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">I'll try with nodejs version that you're using.<br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 4, 2016 at 11:38 AM, Brendan Le Foll <span dir="ltr"><<a href="mailto:brendan.le.foll@intel.com" target="_blank">brendan.le.foll@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, May 03, 2016 at 01:24:49PM -0300, Fabio Berton wrote:<br>
> Hi all!<br>
> I'm trying to install some recipes that use npm class and I have two<br>
> questions.<br>
> 1 - Why use S = "${WORKDIR}/npmpkg"? This not work for me.<br>
<br>
</span>That's surprising the fetcher basically extracts it that way so the<br>
class just defaults to that location as 'the right thing'. Do you have<br>
an example recipe that isn't working that I could take a look at?<br>
<span class=""><br>
> 2 - Using option --no-registry inside npm_do_compile task I get this<br>
> error:<br>
> | npm ERR! Registry not defined and registry files not found:<br>
> "/home/user/prj/build/tmp/work/all-linux-musleabi/gulp-cli/1.2.1-r0/npm<br>
> _cache/noregistry/wreck/.cache.json",<br>
> "/home/user/prj/build/tmp/work/all-linux-musleabi/gulp-cli/1.2.1-r0/npm<br>
> _cache/wreck/.cache.json".<br>
> | npm ERR!<br>
> | npm ERR! If you need help, you may report this error at:<br>
</span>> | npm ERR! <[1]<a href="https://github.com/npm/npm/issues" rel="noreferrer" target="_blank">https://github.com/npm/npm/issues</a>><br>
<span class="">> | npm ERR! Linux 3.18.0-trunk-amd64<br>
> | npm ERR! argv<br>
> "/home/user/prj/build/tmp/sysroots/x86_64-linux/usr/bin/node"<br>
> "/home/user/prj/build/tmp/sysroots/x86_64-linux/usr/bin/npm"<br>
> "--arch=arm" "--production" "--no-registry" "install"<br>
> | npm ERR! node v4.4.1<br>
> | npm ERR! npm v2.14.20<br>
</span>> I found this issue [2]<a href="https://github.com/npm/npm/issues/5509" rel="noreferrer" target="_blank">https://github.com/npm/npm/issues/5509</a> and using<br>
<span class="">> --cache-min 99999 instead of --no-registry this error doesn't appears<br>
> and build works fine.<br>
> I noticed that nodejs recipe is using this patch<br>
</span>> [3]<a href="https://github.com/bendaaron/meta-oe-dev/commit/3e02a40d689a70025472" rel="noreferrer" target="_blank">https://github.com/bendaaron/meta-oe-dev/commit/3e02a40d689a70025472</a><br>
<span class="">> 15473a00606d8213ce0c<br>
> but seems not fix for me.<br>
<br>
</span>So I saw this, and ignored it since --no-registry was working fine for<br>
me with that patch and then with 4.2.x. It seems the cache-min option<br>
doesn't always work as intented.<br>
<br>
I fired up a build with 4.4.x from<br>
<a href="https://github.com/ostroproject/meta-iot-web/blob/master/recipes-devtools/nodejs/nodejs_4.4.1.bb" rel="noreferrer" target="_blank">https://github.com/ostroproject/meta-iot-web/blob/master/recipes-devtools/nodejs/nodejs_4.4.1.bb</a><br>
and it seemed to build ok for me with --no-registry.<br>
<br>
Cheers,<br>
Brendan<br>
</blockquote></div><br></div>