It seems that npmsw does not support github URLs in the following format: github:balena-io-modules/unbzip2-stream#942fc218013c14adab01cf693b0500cf6ac83193 or even: balena-io-modules/unbzip2-stream#942fc218013c14adab01cf693b0500cf6ac83193 which are supported by the "standard" npm tool and documented at: https://docs.npmjs.com/cli/v6/commands/npm-install It looks like the relevant poky / bitbake lines of code are around: https://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/bitbake/lib/bb/fetch2/npmsw.py?id=507a47a4e5077d5f8f76d9629be6b871dfd8eb90#n125 Please add support for those github URL formats. Thanks! Additional info: The balena CLI is an open source Node.js / npm project: https://github.com/balena-io/balena-cli It includes a fairly large npm-shrinkwrap.json file: https://github.com/balena-io/balena-cli/blob/master/npm-shrinkwrap.json One of our users attempted building the balena CLI using Yocto / Bitbake and reported getting errors from Bitbake's npmsw regarding github URLs. A workaround seems to be to modify the URLs to use the following (older?) format: git+https://github.com/resin-io-modules/unbzip2-stream.git#942fc218013c14adab01cf693b0500cf6ac83193 The error / bug was originally reported at: https://forums.balena.io/t/balena-cli-compilation-issues-in-yocto/252703 I have also created a counterpart issue in the balena CLI repo: https://github.com/balena-io/balena-cli/issues/2192
It was also reported that npmsw does not support "the from: line to specify branches with commits not merged to master (branch must be specified in the version: line before the commit hash)". I think it regards the "from" property of shrinkwrap blocks such as: "multicast-dns": { "version": "git+https://github.com/resin-io-modules/multicast-dns.git#a15c63464eb43e8925b187ed5cb9de6892e8aacc", "from": "git+https://github.com/resin-io-modules/multicast-dns.git#listen-on-all-interfaces", ... }
A valid bug but we don't have anyone to work on it.
Paulo, would you like to work on this bug? Bumping to M2.
This has partially been addressed by --- commit 1d8af6aed0a929f493d2c3e31b8d3ee3a70beb43 Author: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com> Date: Thu Oct 28 14:41:43 2021 +0200 fetch2: npmsw: Add support for github prefix in npm shrinkwrap version --- I have added the other shortforms for bitbucket, gist, and gitlab along with some tests. I will send the review out next week.
This was partially fixed by commit 1d8af6aed0a9 (Thu Oct 28 14:41:43 2021 +0200) [fetch2: npmsw: Add support for github prefix in npm shrinkwrap version] which added support for the github prefix. To complete the fix, commit 0ac6f6cb5d807919ed13a8b7bb3fb551b79c5a71 (Fri Feb 24 15:43:44 2023 -0500) [fetch/npmsw: add more short forms for git operations] was merged which adds support for the gist, gitlab and bitbucket prefixes as well as the gitlab short form which forgoes any prefix at all.