| Summary: | devtool: fails to add an npm project if nodejs-native is not already built | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Henry Bruce <henry.bruce> |
| Component: | devtools / tool chain | Assignee: | Paul Eggleton <bluelightning> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | brian.avery, meta.mr.watcher, meta.watcher |
| Version: | 2.2 | ||
| Target Milestone: | 2.2 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
|
Description
Henry Bruce
2016-09-27 22:12:02 UTC
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. |