* Issue with Integrating NPM Package Dependencies in Yocto
@ 2024-06-28 5:07 Daniel Chaves
2024-06-28 9:01 ` [yocto] " Alexander Kanavin
2025-05-02 10:20 ` delvin.c Varghese
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Chaves @ 2024-06-28 5:07 UTC (permalink / raw)
To: yocto
[-- Attachment #1: Type: text/plain, Size: 1682 bytes --]
Hello, everyone
I am currently working on a project where I need to integrate NPM package
dependencies using Yocto Project's BitBake fetcher utilities. I am parsing
"package-lock.json" files and incorporating this data into the fetcher
implementation. The fetcher I'm using is the "npmsw", however, I am
encountering some challenges with this fetcher being capable of fetching
the NPM dependencies from the "package-lock.json".
Here are the details of my setup:
* I'm working with the Kirkstone branch
* SRC_URI looks like this:
SRC_URI = "...\
npmsw://${THISDIR}/package-lock.json;dev=0;destsuffix=git/node_modules \
"
* I'm testing with the following package‐lock.json file:
{
"name": "my-project",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "my-project",
"version": "1.0.0",
"dependencies": {
"express": "^4.17.1",
"lodash": "^4.17.21",
"mongoose": "^6.0.13"
}
}
},
"dependencies": {
"@babel/code-frame": {
"version": "7.10.1",
"resolved": "
https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz",
"integrity": "
sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==
",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.1"
}
}
}
}
This is the error I see:
ERROR: test-test-1.0.0-r0 do_fetch: ExpansionError(
'TUNE_FEATURES:tune-armv8a-crc', '${TUNE_FEATURES:tune-armv8a} crc',
RecursionError('maximum recursion depth exceeded'))
Apparently, the fetcher gets into an infinite loop. Has anyone faced a
similar issue or can provide guidance on how to resolve this?
Thank you for your assistance.
Best regards
—Daniel
[-- Attachment #2: Type: text/html, Size: 12631 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [yocto] Issue with Integrating NPM Package Dependencies in Yocto
2024-06-28 5:07 Issue with Integrating NPM Package Dependencies in Yocto Daniel Chaves
@ 2024-06-28 9:01 ` Alexander Kanavin
2025-05-02 10:20 ` delvin.c Varghese
1 sibling, 0 replies; 4+ messages in thread
From: Alexander Kanavin @ 2024-06-28 9:01 UTC (permalink / raw)
To: yocto, dchvs11
I would suggest to start with poky master and one of its standard
targets. If the issue occurs there as well, it's easier for everyone
to help, and if not, you can try to bisect where it broke.
Alex
On Fri, 28 Jun 2024 at 07:08, Daniel via lists.yoctoproject.org
<dchvs11=gmail.com@lists.yoctoproject.org> wrote:
>
> Hello, everyone
>
> I am currently working on a project where I need to integrate NPM package dependencies using Yocto Project's BitBake fetcher utilities. I am parsing "package-lock.json" files and incorporating this data into the fetcher implementation. The fetcher I'm using is the "npmsw", however, I am encountering some challenges with this fetcher being capable of fetching the NPM dependencies from the "package-lock.json".
>
> Here are the details of my setup:
>
> * I'm working with the Kirkstone branch
> * SRC_URI looks like this:
>
> SRC_URI = "...\
> npmsw://${THISDIR}/package-lock.json;dev=0;destsuffix=git/node_modules \
> "
>
> * I'm testing with the following package‐lock.json file:
>
> {
> "name": "my-project",
> "lockfileVersion": 2,
> "requires": true,
> "packages": {
> "": {
> "name": "my-project",
> "version": "1.0.0",
> "dependencies": {
> "express": "^4.17.1",
> "lodash": "^4.17.21",
> "mongoose": "^6.0.13"
> }
> }
> },
> "dependencies": {
> "@babel/code-frame": {
> "version": "7.10.1",
> "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz",
> "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==",
> "dev": true,
> "requires": {
> "@babel/highlight": "^7.10.1"
> }
> }
> }
> }
>
> This is the error I see:
>
> ERROR: test-test-1.0.0-r0 do_fetch: ExpansionError('TUNE_FEATURES:tune-armv8a-crc', '${TUNE_FEATURES:tune-armv8a} crc', RecursionError('maximum recursion depth exceeded'))
>
> Apparently, the fetcher gets into an infinite loop. Has anyone faced a similar issue or can provide guidance on how to resolve this?
>
> Thank you for your assistance.
>
> Best regards
> —Daniel
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#63406): https://lists.yoctoproject.org/g/yocto/message/63406
> Mute This Topic: https://lists.yoctoproject.org/mt/106923227/1686489
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [yocto] Issue with Integrating NPM Package Dependencies in Yocto
2024-06-28 5:07 Issue with Integrating NPM Package Dependencies in Yocto Daniel Chaves
2024-06-28 9:01 ` [yocto] " Alexander Kanavin
@ 2025-05-02 10:20 ` delvin.c Varghese
2025-05-02 11:29 ` Gyorgy Sarvari
1 sibling, 1 reply; 4+ messages in thread
From: delvin.c Varghese @ 2025-05-02 10:20 UTC (permalink / raw)
To: Daniel, yocto
[-- Attachment #1: Type: text/plain, Size: 126 bytes --]
HI Daniel,
Is your issue with npmsw solved. I am getting the same issue. if you share your solution it will be very helpful
[-- Attachment #2: Type: text/html, Size: 153 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [yocto] Issue with Integrating NPM Package Dependencies in Yocto
2025-05-02 10:20 ` delvin.c Varghese
@ 2025-05-02 11:29 ` Gyorgy Sarvari
0 siblings, 0 replies; 4+ messages in thread
From: Gyorgy Sarvari @ 2025-05-02 11:29 UTC (permalink / raw)
To: yocto, delvincv, Daniel
A note, which may or may not be the answer:
When you use ${THISDIR} in SRC_URI (or in some other place), you need to
use immediate expansion with the ":=" operator:
SRC_URI := "file://${THISDIR}/foo.json"
Otherwise THISDIR might have different value if it is resolved at a
later time.
On 5/2/25 12:20, delvin.c Varghese via lists.yoctoproject.org wrote:
> HI Daniel,
> Is your issue with npmsw solved. I am getting the same issue. if you
> share your solution it will be very helpful
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#65275): https://lists.yoctoproject.org/g/yocto/message/65275
> Mute This Topic: https://lists.yoctoproject.org/mt/106923227/6084445
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-05-02 11:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 5:07 Issue with Integrating NPM Package Dependencies in Yocto Daniel Chaves
2024-06-28 9:01 ` [yocto] " Alexander Kanavin
2025-05-02 10:20 ` delvin.c Varghese
2025-05-02 11:29 ` Gyorgy Sarvari
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox