| Summary: | 'express-ws' npm failed during build | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Pierre Godicheau <pgodicheau> |
| Component: | devtools / tool chain | Assignee: | BELOUARGA Mohamed <belouargamohamed> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | Archana.Polampalli, belouargamohamed, meta.mr.watcher, meta.watcher, randy.macleod, steve, tim.orling |
| Version: | unspecified | ||
| Target Milestone: | 5.2 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Pierre Godicheau
2023-02-21 23:20:46 UTC
Tim will review. This looks to be a problem with upstream metadata being out of date (unable to resolve the 'express' dependency). (Unless it is a different problem with the caching and/or network access restrictions during a task). The project has been questioned as to whether it is 'dead': https://github.com/HenningM/express-ws/issues/135 A comment above mentioned a more recently maintained fork: https://github.com/HenningM/express-ws/issues/135#issuecomment-756978950 https://github.com/aral/express-ws Some additional alternatives are also mentioned. Pierre, can you: (1) Try to build 'express-ws' outside of Bitbake environment (make sure npm/yarn is actually able to resolve the dependencies) and report success/failure? (2) Try one of the alternatives and see if it works for you? As a workaround, it appears you can run 'npm install express-ws' (after installing the appropriate 'nodejs' version e.g. with 'nvm' on your host) and then use the resulting 'package-lock.json' (replace the 'npm-shrinkwrap.json' in the recipe). This might be uncovering an issue with 'nodejs-oe-cache-native', but I am no expert on the caching. Thank you or the workaround, (1) outside the bitbake environement it works perectly. And as workaround I simply do on the target a 'npm install' and it is ok . Now I ve simplified my nodejs application which use now 'ws' instead of 'express-ws' and I have no problem installing it using Bitbake unlike 'express-ws'. Anyway, the issue remains in bitbake but it doesn't affect me now Archana, you could work on this if you like. Hey everyone, I solved this issue normally in master branch, can you please check and tell me if it works ? Thanks Hi Thanks for efforts, unfortunately Im on 'kirkstone' branch and I do not have the opportunity to move to 'master' for now Belouarga, Do you have a link to the commit(s) that fix this issue? If it works on master, Archana may backport it to mickledore/kirkstone branches. Thanks, ../Randy Hey Randy, These are the commits, I added some commits on bitbake and some others on oe-core. You can just look at commits with my name, I merely corrected this problem on yocto project. Thanks Thanks Mohamed. For the record for those who like to have such things in bugzilla, here are your commits in: oe-core: ❯ git log --oneline --author=BELOUARGA 6459959bee linux-firmware : Add firmware of RTL8822 serie f8365c0216 classe-recipes: npm: Add support for dependencies and devDependencies 89e02fa47e classes: npm: Add support for the new format of the shrinkwrap file f36021a749 recipetool: create: npm: Add support to handle peer dependencies 488d17c2af recipetool: create: npm: Add support for the new format of the shrinkwrap file a573414864 classes: npm: Handle peer dependencies for npm packages 18e5438de5 recipetool: create: npm: Remove duplicate function to not have future conflicts 6110d9e24e meta: lib: oe: npm_registry: Add more safe caracters bitbake: ❯ git log --oneline --author=BELOUARGA 47ab9d21 fetch2: Check if path is 'None' before calculating checksums 48a102e4 bitbake: fetch2/npmsw: Check if there are dependencies before trying to fetch them b2e1be67 fetch2/npm: Remove special caracters that causes recipe tool to fail 224c2bb1 fetch2/npmsw: Don't fetch dev dependencies when they are not demanded 19b9f7f0 fetch2/npmsw: Add support for the new format of the shrinkwrap file Thanks! Mohammad, Pierre, The defect is resolved on master and maybe scarthgap but not on kirkstone. It sounds like Pierre would like the work backported. Is someone willing to try that, test it and to send patches ? poky.git on kirkstone ❯ git log --oneline -2 186f1ee88d6981e9f4a4a48ff1ee0bd0b719b18b 186f1ee88d classe-recipes: npm: Add support for dependencies and devDependencies 17732f9cb4 classes: npm: Add support for the new format of the shrinkwrap file ❯ git tag --contains 186f1ee88d6981e9f4a4a48ff1ee0bd0b719b18b 4.3_M2 4.3_M3 5.0_M1 5.0_M2 5.0_M3 nanbield-4.3 nanbield-4.3.1 nanbield-4.3.2 nanbield-4.3.3 nanbield-4.3.4 scarthgap-5.0 scarthgap-5.0.1 yocto-4.3 yocto-4.3.1 yocto-4.3.2 yocto-4.3.3 yocto-4.3.4 yocto-5.0 yocto-5.0.1 Hi I plan to update to scarthgap in 3 months, so if you can wait until it I ll give you my test result at this moment. Regards Thanks for the reply Pierre. Mohammad, back to you. You can back-port if you think there are interested npm users on kirkstone. Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy) Fixed in master so closing. |