| Summary: | devtool: fails to add node.js project that has local dependency | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Henry Bruce <henry.bruce> |
| Component: | devtools / tool chain | Assignee: | Unassigned <unassigned> |
| Status: | NEW --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bluelightning, frederic.martinsons, jeanmarie.lemetayer, meta.mr.watcher, meta.watcher, randy.macleod, rebecca.swee.fun.chang |
| Version: | 2.2 | ||
| Target Milestone: | Future | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
Adding all steps to reproduce ----------------------------- $ git clone -b morty git://git.yoctoproject.org/poky $ git clone -b morty git://git.openembedded.org/meta-openembedded $ source poky/oe-init-build-env $ bitbake-layers add-layer ../meta-openembedded/meta-oe $ devtool add my-node-test-lib https://github.com/whbruce/my-node-test-lib.git $ devtool add my-node-test-app https://github.com/whbruce/my-node-test-app.git I have also run into similar issue in crops/esdk-container on v2.4.1-rc1 sdkuser@b6a396ad36ee:/workdir$ devtool add npm "npm://registry.npmjs.org;name=forever;version=0.15.1" NOTE: Starting bitbake server... NOTE: Starting bitbake server... NOTE: Fetching npm://registry.npmjs.org;name=forever;version=0.15.1;noverify=1... Loading cache: 100% |################################################################################################################################################################################| Time: 0:00:01 Loaded 1272 entries from dependency cache. Parsing recipes: 100% |##############################################################################################################################################################################| Time: 0:00:00 Parsing of 816 .bb files complete (815 cached, 1 parsed). 1273 targets, 43 skipped, 0 masked, 0 errors. NOTE: Resolving any missing task queue dependencies ERROR: Nothing PROVIDES 'nodejs-native'. Close matches: nss-native tzcode-native nspr-native ERROR: Failed to fetch URL npm://registry.npmjs.org;name=forever;version=0.15.1;noverify=1 ERROR: Command '. /workdir/layers/build/oe-init-build-env /workdir > /dev/null && script -e -q -c "recipetool --color=always create --devtool -o /tmp/devtool1vf6gt2j 'npm://registry.npmjs.org;name=forever;version=0.15.1' -x /workdir/workspace/sources/devtoolsrcesg8at_8 -N npm" /dev/null' failed Jean-Marie are you interested in working on this bug? It seems the same problem I ran into for rust recipe see this series that is under discussion: https://patchwork.yoctoproject.org/project/oe-core/list/?series=11510 And in particularly the patch 1 and 4. cargo based recipe has a "patch" mechanism to allow override dependencies to get the lib locally. I don't know node.js and npm at all but if there is such a mechanism also, it should be used in npm.bbclass and externalsrc.bbclass should also be modified in the same way I did for cargo. |
Node.js can specify dependencies that are in local folders instead of registry. This is used when developing a module. Instead of defining dependencies by version "dependencies": { "my-node-test-lib": "0.1.0" } you specify a path "dependencies": { "my-node-test-lib": "../my-node-test-lib" } If you use the "local" form of dependency specification, devtool fails as it still looks for module in the registry and obviously it isn't there. Observed behavior ----------------- $ devtool add my-node-test-app ~/Projects/nodejs/my-node-test-app/ ERROR: Command 'recipetool --color=always create -o /tmp/devtoolfsp88t_c "/home/hbruce/Projects/nodejs/my-node-test-app" -N my-node-test-app' failed: npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/my-node-test-lib npm ERR! 404 npm ERR! 404 'my-node-test-lib' is not in the npm registry. Expected behavior ----------------- Devtool completes successfully, provided path can be satisfied