<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10760</bug_id>
          
          <creation_ts>2016-12-02 19:02:19 +0000</creation_ts>
          <short_desc>devtool: fails to build project &apos;npm://registry.npmjs.org;name=statsd;version=0.8.0&apos;</short_desc>
          <delta_ts>2020-05-14 12:09:32 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Future</target_milestone>
          <dependson>10992</dependson>
          <blocked>10653</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>jeanmarie.lemetayer</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>pab</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68819</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-12-02 19:02:19 +0000</bug_when>
    <thetext>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 &apos;npm://registry.npmjs.org;name=statsd;version=0.8.0&apos;
$ 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 &quot;/path/to/build/tmp/sysroots/x86_64-linux/usr/bin/node&quot; &quot;/path/to/build/tmp/sysroots/x86_64-linux/usr/bin/npm&quot; &quot;--arch=ia32&quot; &quot;--target_arch=ia32&quot; &quot;--production&quot; &quot;--no-registry&quot; &quot;install&quot;
| npm ERR! node v4.6.1
| npm ERR! npm  v2.15.9
| 
| npm ERR! Registry not defined and registry files not found: &quot;/path/to/build/tmp/work/i586-poky-linux/statsd/0.8.0-r0/npm_cache/modern-syslog/.cache.json&quot;.


Points to note
==============
modern-syslog project successfully builds 
$ devtool add &apos;npm://registry.npmjs.org;name=modern-syslog;version=1.1.2&apos;$ 
devtool build modern-syslog</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69109</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-12-13 21:56:20 +0000</bug_when>
    <thetext>I have found the same error where the following dependent packages fail to build

jsdoc-to-markdown
macaddress
ws
jsdoc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69220</commentid>
    <comment_count>2</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-12-19 18:18:19 +0000</bug_when>
    <thetext>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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70575</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-02-09 03:53:39 +0000</bug_when>
    <thetext>I have sent the patch(es) noted above and they have been merged, however I believe this isn&apos;t the complete fix - further progress is currently blocked by bug 10992 which I am working on.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87196</commentid>
    <comment_count>4</comment_count>
    <who name="Jean-Marie Lemetayer">jeanmarie.lemetayer</who>
    <bug_when>2020-05-14 12:09:32 +0000</bug_when>
    <thetext>With the last work around npm, this seems to be working now.

Note that the devtool url has been updated:

$ devtool add &apos;npm://registry.npmjs.org;package=statsd;version=0.8.0&apos;
$ devtool build statsd</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>