Bug 10760 - devtool: fails to build project 'npm://registry.npmjs.org;name=statsd;version=0.8.0'
Summary: devtool: fails to build project 'npm://registry.npmjs.org;name=statsd;version...
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium normal
Target Milestone: Future
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on: 10992
Blocks: 10653
  Show dependency tree
 
Reported: 2016-12-02 19:02 UTC by Henry Bruce
Modified: 2020-05-14 12:09 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Bruce 2016-12-02 19:02:19 UTC
Observed behavior
=================
devtool successfully adds statsd npm project but fails to build it due to a registry error.

Expected behavior
=================
devtool should successfully add and build statsd project


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 'npm://registry.npmjs.org;name=statsd;version=0.8.0'
$ devtool build statsd
ERROR: statsd-0.8.0-r0 do_compile: Function failed: do_compile (log file is located at /path/to/build/tmp/work/i586-poky-linux/statsd/0.8.0-r0/temp/log.do_compile.28279)
| npm ERR! Linux 4.8.8-200.fc24.x86_64
| npm ERR! argv "/path/to/build/tmp/sysroots/x86_64-linux/usr/bin/node" "/path/to/build/tmp/sysroots/x86_64-linux/usr/bin/npm" "--arch=ia32" "--target_arch=ia32" "--production" "--no-registry" "install"
| npm ERR! node v4.6.1
| npm ERR! npm  v2.15.9
| 
| npm ERR! Registry not defined and registry files not found: "/path/to/build/tmp/work/i586-poky-linux/statsd/0.8.0-r0/npm_cache/modern-syslog/.cache.json".


Points to note
==============
modern-syslog project successfully builds 
$ devtool add 'npm://registry.npmjs.org;name=modern-syslog;version=1.1.2'$ 
devtool build modern-syslog
Comment 1 Henry Bruce 2016-12-13 21:56:20 UTC
I have found the same error where the following dependent packages fail to build

jsdoc-to-markdown
macaddress
ws
jsdoc
Comment 2 Henry Bruce 2016-12-19 18:18:19 UTC
A poky patch that acts as a temporary fix for the statsd build can be found at 
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/patch/?id=2fcb6cf005bd29ee800d251145795e72b1cd6f1c

Note that adding project via https still leads to a similar failure at build time
i.e. devtool add https://github.com/etsy/statsd.git
Comment 3 Paul Eggleton 2017-02-09 03:53:39 UTC
I have sent the patch(es) noted above and they have been merged, however I believe this isn't the complete fix - further progress is currently blocked by bug 10992 which I am working on.
Comment 4 Jean-Marie Lemetayer 2020-05-14 12:09:32 UTC
With the last work around npm, this seems to be working now.

Note that the devtool url has been updated:

$ devtool add 'npm://registry.npmjs.org;package=statsd;version=0.8.0'
$ devtool build statsd