[OE-core] npm class usage

Brendan Le Foll brendan.le.foll at intel.com
Wed May 4 14:38:06 UTC 2016


On Tue, May 03, 2016 at 01:24:49PM -0300, Fabio Berton wrote:
>    Hi all!
>    I'm trying to install some recipes that use npm class and I have two
>    questions.
>    1 - Why use S = "${WORKDIR}/npmpkg"? This not work for me.

That's surprising the fetcher basically extracts it that way so the
class just defaults to that location as 'the right thing'. Do you have
an example recipe that isn't working that I could take a look at?

>    2 - Using option --no-registry inside npm_do_compile task I get this
>    error:
>    | npm ERR! Registry not defined and registry files not found:
>    "/home/user/prj/build/tmp/work/all-linux-musleabi/gulp-cli/1.2.1-r0/npm
>    _cache/noregistry/wreck/.cache.json",
>    "/home/user/prj/build/tmp/work/all-linux-musleabi/gulp-cli/1.2.1-r0/npm
>    _cache/wreck/.cache.json".
>    | npm ERR!
>    | npm ERR! If you need help, you may report this error at:
>    | npm ERR!     <[1]https://github.com/npm/npm/issues>
>    | npm ERR! Linux 3.18.0-trunk-amd64
>    | npm ERR! argv
>    "/home/user/prj/build/tmp/sysroots/x86_64-linux/usr/bin/node"
>    "/home/user/prj/build/tmp/sysroots/x86_64-linux/usr/bin/npm"
>    "--arch=arm" "--production" "--no-registry" "install"
>    | npm ERR! node v4.4.1
>    | npm ERR! npm  v2.14.20
>    I found this issue [2]https://github.com/npm/npm/issues/5509 and using
>    --cache-min 99999 instead of --no-registry this error doesn't appears
>    and build works fine.
>    I noticed that nodejs recipe is using this patch
>    [3]https://github.com/bendaaron/meta-oe-dev/commit/3e02a40d689a70025472
>    15473a00606d8213ce0c
>    but seems not fix for me.

So I saw this, and ignored it since --no-registry was working fine for
me with that patch and then with 4.2.x. It seems the cache-min option
doesn't always work as intented.

I fired up a build with 4.4.x from
https://github.com/ostroproject/meta-iot-web/blob/master/recipes-devtools/nodejs/nodejs_4.4.1.bb
and it seemed to build ok for me with --no-registry.

Cheers,
Brendan



More information about the Openembedded-core mailing list