Observed behavior ----------------- $ devtool add "npm://registry.npmjs.org;name=grunt-cli;version=1.1.0" ERROR: Command 'recipetool --color=always create -o /tmp/devtooll09swkt2 "npm://registry.npmjs.org;name=grunt-cli;version=1.1.0" -x /path/to/build/workspace/sources/devtoolsrcuogngddz' failed: ERROR: npm:// URL requested but npm is not available - you need to either build nodejs-native or install npm using your package manager If you run 'bitbake nodejs-native' *OR* install node on host system, then rerun above devtool add command it complete OK. Observed behavior ----------------- [build]$ devtool add "npm://registry.npmjs.org;name=grunt-cli;version=1.1.0" Command completes without error and does not require nodejs-native to be man ually build aHEAD OF TIME. Notes ------ 1. This is a regression. The above 'devtool add' command works on krogoth. 2. nodejs-native recipe should not allow fallback to node installed on host
1. devtool add did require npm on krogoth - there's no way it could fetch the source for the specified npm package without it. It may be that we check for it now where we didn't before. I'll have to investigate. Do you have npm available on your host? 2. Not sure I understand what you mean - should *not* allow ? If devtool attempted to build nodejs-native if it could not run npm, would that be OK?
Henry - please comment
yes. I believe so. It seems like we should either: 1) document that to use the node functionality you need to have host npm or 2) (better, i think) just try to build nodejs-native if not available. When I had no host npm and had built nodejs-native, it worked.
To extend on my original comments 1. To clarify observed behavior on krogoth When running devtool add "npm://registry.npmjs.org;name=grunt-cli;version=1.1.0" 'devtool add' fetches and builds nodejs-native then completes successfully 'devtool build grunt-cli' will then complete successfully 2. On master the observed behavior (i.e. failure) can be avoided if npm is installed on host. We should update devtool's npm support to avoid using host's npm as its version is not controlled and force use of npm from nodejs-native. Thus if nodejs-native is not available, 'devtool add' of npm project should fail. I hope that makes more sense.
Fix merged to master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=18caacae069a025662fcdd96b846857fc3107e41