Re: [yocto] NPM support on Dunfell

2022-04-18 Thread Joel Winarske
The takeaways using inherit npm:

1. Does not support 'scoped packages'

2. fetching is not multi-threaded.  A NPM based recipe will run uni-proc
with a considerable amount of overhead; each package is pulled and cached
independently.  Whereas "npm install" or "npm ci" runs multi-threaded.

For my use case I used base.bbclass, and implemented it all manually.  The
downside with this approach is there is no long term support via DL_DIR.

A reference for others that might hit this:
https://github.com/meta-webthings/meta-webthings/blob/dunfell/recipes/webthings-gateway/webthings-gateway_git.bb

Cheers,
Joel


On Mon, Apr 11, 2022 at 7:18 PM Joel Winarske 
wrote:

> I'm seeing some gaps and performance issues.
>
> Examples:
> 1. Setting NPM_INSTALL_DEV = "1" I am rewarded with:
>
> 169
> npm
> ERR! Could not install from
> "../../__w/meta-flutter/rpi4-drm-dunfell-latest/raspberrypi4-64/tmp/work/aarch64-poky-linux/webthings-gateway/1.0.0+gitAUTOINC+4c600fc973-r0/git/node_modules/@babel/compat-data"
> as it does not contain a package.json file.
> 170
> 
>
> The upstream build uses equivalent to:
> npm --user root --cache "${NPM_CACHE}" ci
> ./node_modules/.bin/webpack
> npm --cache "${NPM_CACHE}" prune --production
>
> 2. Running npm_do_configure is taking 48+ minutes.  Granted it's a large
> project, but basically the configure task is running uni-proc.
>
> Who is the POC supporting NPM on Dunfell?
>
> Thanks,
> Joel
>

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#56804): https://lists.yoctoproject.org/g/yocto/message/56804
Mute This Topic: https://lists.yoctoproject.org/mt/90410752/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[yocto] NPM support on Dunfell

2022-04-11 Thread Joel Winarske
I'm seeing some gaps and performance issues.

Examples:
1. Setting NPM_INSTALL_DEV = "1" I am rewarded with:

169
npm
ERR! Could not install from
"../../__w/meta-flutter/rpi4-drm-dunfell-latest/raspberrypi4-64/tmp/work/aarch64-poky-linux/webthings-gateway/1.0.0+gitAUTOINC+4c600fc973-r0/git/node_modules/@babel/compat-data"
as it does not contain a package.json file.
170


The upstream build uses equivalent to:
npm --user root --cache "${NPM_CACHE}" ci
./node_modules/.bin/webpack
npm --cache "${NPM_CACHE}" prune --production

2. Running npm_do_configure is taking 48+ minutes.  Granted it's a large
project, but basically the configure task is running uni-proc.

Who is the POC supporting NPM on Dunfell?

Thanks,
Joel

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#56737): https://lists.yoctoproject.org/g/yocto/message/56737
Mute This Topic: https://lists.yoctoproject.org/mt/90410752/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-