public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
From: "Böszörményi Zoltán" <zboszor@gmail.com>
To: openembedded-core@lists.openembedded.org
Subject: npm based packages omit dependencies since Yocto 5.1
Date: Tue, 21 Jan 2025 11:31:14 +0100	[thread overview]
Message-ID: <264405d9-4f89-4102-acf2-320e73235a59@gmail.com> (raw)

Hi,

I have a minimalistic recipe for pm2 (https://www.npmjs.com/package/pm2):
==================================
node-pm2_5.3.1.bb
==================================
SUMMARY = "Production process manager for Node.JS applications with a built-in load balancer."
HOMEPAGE = "http://pm2.keymetrics.io/"
LICENSE = "AGPL-3.0-or-later"
LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=9f9fa01c099265d62f73735e404ff8bb"

SRC_URI = " \
     npm://registry.npmjs.org/;package=pm2;version=${PV} \
     npmsw://${THISDIR}/${BPN}/npm-shrinkwrap.json \
     "

S = "${UNPACKDIR}/npm"

inherit npm

do_install:append () {
         rm -rf ${D}${libdir}/node_modules/pm2/lib/templates/init-scripts/openrc.tpl
}

RDEPENDS:${PN} = "bash"
==================================

Previously this recipe has built and worked correctly under
Yocto 4.3 and 5.0, as in the package included its own internal
dependencies in /usr/lib/node_modules/pm2/node_modules.
Yocto 4.3 ships nodejs 20.8.1, Yocto 5.0 ships nodejs 20.12.2.

With Yocto 5.1 (node 20.18.0) and master (22.12.0), the package
only has the pm2 module contents in /usr/lib/node_modules/pm2
but no dependencies.

It seems that at some point, nodejs 20.x LTS upgraded npm
to a version with a breaking change which now flattens the
dependencies into a single level in /usr/lib/node_modules
from the previously accustomed dependency tree in
/usr/lib/node_modules/pm2/node_modules.

Is there an incantation of EXTRA_OENPM or the npm:// SRC_URI
that would allow either to unflatten the dependency tree, or
include the dependencies as well as the main node module?

Thanks in advance,
Zoltán Böszörményi



             reply	other threads:[~2025-01-21 10:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 10:31 Böszörményi Zoltán [this message]
2025-01-21 10:33 ` [OE-core] npm based packages omit dependencies since Yocto 5.1 Alexander Kanavin
2025-01-21 10:53 ` Martin Jansa
2025-01-21 11:27   ` Böszörményi Zoltán
     [not found]   ` <181CB1A49703171B.28835@lists.openembedded.org>
2025-01-21 16:25     ` Böszörményi Zoltán
2025-01-23  9:11       ` Martin Jansa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=264405d9-4f89-4102-acf2-320e73235a59@gmail.com \
    --to=zboszor@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox