<?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>11728</bug_id>
          
          <creation_ts>2017-06-27 22:27:59 +0000</creation_ts>
          <short_desc>devtool: fails to build npm://registry.npmjs.org;name=cute-files;version=1.0.2</short_desc>
          <delta_ts>2020-05-17 03:38:25 +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.3.1</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>
          
          <blocked>10653</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>ismo.puustinen</cc>
    
    <cc>jeanmarie.lemetayer</cc>
    
    <cc>matthew.k.hansen</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>74585</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-06-27 22:27:59 +0000</bug_when>
    <thetext>Steps to recreate
=================
$ git clone -b pyro git://git.yoctoproject.org/poky
$ git clone -b pyro git://git.openembedded.org/meta-openembedded
$ source poky/oe-init-build-env
$ bitbake-layers add-layer ../meta-openembedded/meta-oe
$ devtool add &quot;npm://registry.npmjs.org;name=cute-files;version=1.0.2&quot;
$ devtool build cute-files

Observe error (2 more like this)
--------------------------------
ERROR: cute-files-1.0.2-r0 do_install: Function failed: do_install (log file is located at /path/to/build/tmp/work/corei7-64-poky-linux/cute-files/1.0.2-r0/temp/log.do_install.4639)
| npm ERR! Linux 4.10.17-100.fc24.x86_64
| npm ERR! argv &quot;/path/to/build/tmp/work/corei7-64-poky-linux/cute-files/1.0.2-r0/recipe-sysroot-native/usr/bin/node&quot; &quot;/path/to/build/tmp/work/corei7-64-poky-linux/cute-files/1.0.2-r0/recipe-sysroot-native/usr/bin/npm&quot; &quot;install&quot; &quot;--prefix&quot; &quot;/path/to/build/tmp/work/corei7-64-poky-linux/cute-files/1.0.2-r0/image/usr&quot; &quot;-g&quot; &quot;--arch=x64&quot; &quot;--target_arch=x64&quot; &quot;--production&quot; &quot;--no-registry&quot;
| npm ERR! node v4.8.2
| npm ERR! npm  v2.15.11
| 
| npm ERR! Registry not defined and registry files not found: &quot;/path/to/build/tmp/work/corei7-64-poky-linux/cute-files/1.0.2-r0/npm_cache/noregistry/express/.cache.json&quot;, &quot;/path/to//build/tmp/work/corei7-64-poky-linux/cute-files/1.0.2-r0/npm_cache/express/.cache.json&quot;.

Workaround
==========
Use npm.bbclass do_compile logic from morty
npm_do_install() {
	mkdir -p ${NPM_INSTALLDIR}/
	cp -a ${S}/* ${NPM_INSTALLDIR}/ --no-preserve=ownership
}

Comments
========
1. This is a regression, recipe builds for morty.
2. cute-files was chosen as the example to use in the npm Tips and Tricks article. Article now have to be tagged as invalid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>74629</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-06-29 09:37:21 +0000</bug_when>
    <thetext>*** Bug 11733 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87223</commentid>
    <comment_count>2</comment_count>
    <who name="Jean-Marie Lemetayer">jeanmarie.lemetayer</who>
    <bug_when>2020-05-17 03:38:25 +0000</bug_when>
    <thetext>This is fixed in the master:

% devtool add &apos;npm://registry.npmjs.org;package=cute-files;version=1.0.2&apos;
% devtool build cute-files</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>