[OE-core] npm class usage

Fabio Berton fabio.berton at ossystems.com.br
Wed May 4 14:53:08 UTC 2016


Hi Brendan,

Thanks for reply.

I'm trying to use npm class with this layer
https://github.com/imyller/meta-nodejs

For example, I changed this recipe
https://github.com/imyller/meta-nodejs/blob/master/recipes/grunt/grunt-cli_1.1.0.bb
to use npm class provided by oe-core and removed all classes from
meta-nodejs.

I can install grunt-cli If I remove S = ${WORKDIR}/npmpkg and
--no-registry option.

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.

I'll try with nodejs version that you're using.


On Wed, May 4, 2016 at 11:38 AM, Brendan Le Foll <brendan.le.foll at intel.com>
wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160504/7c15142d/attachment-0002.html>


More information about the Openembedded-core mailing list