Re: NPM support on Dunfell
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.
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:
Cheers,
Joel
On Mon, Apr 11, 2022 at 7:18 PM Joel Winarske <joel.winarske@...> wrote:
I'm seeing some gaps and performance issues.Examples:1. Setting NPM_INSTALL_DEV = "1" I am rewarded with:169npm 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.The upstream build uses equivalent to:npm --user root --cache "${NPM_CACHE}" ci
./node_modules/.bin/webpack
npm --cache "${NPM_CACHE}" prune --production2. 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