<?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>10460</bug_id>
          
          <creation_ts>2016-10-19 17:06:35 +0000</creation_ts>
          <short_desc>devtool: npm app module install does not create executable file</short_desc>
          <delta_ts>2017-11-05 20:26:48 +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>2.2.3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          <cc>brendan.le.foll</cc>
    
    <cc>jose.perez.carranza</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="David Lopez Barriba">davidx.lopez.barriba</qa_contact>
          <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>67377</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2016-10-19 17:06:35 +0000</bug_when>
    <thetext>If an npm module contains an application, its executable file is not installed.

Take module cute-files as an example. 
After running &quot;npm install cute-files&quot;, the following symbolic link for app is created: /usr/bin/cute-files -&gt; /usr/lib/node_modules/cute-files/cute-files.js
So running &quot;cute-files&quot; starts the app.

So expected behavior of
$ devtool add &quot;npm://registry.npmjs.org;name=cute-files;version=1.0.2&quot;
$ devtool build cute-files
Would be to find /usr/bin/cute-files in package, but symbolic link is not created.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67404</commentid>
    <comment_count>1</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-20 04:08:28 +0000</bug_when>
    <thetext>OK, so I am looking at doing this by replacing the cp -a command within do_install with npm install --prefix ${D}${prefix} -g - then all of the files including the bin symlinks get installed.

Brendan, is there a particular reason you chose not to use npm install for this? So far I only need to delete an empty ${D}${prefix}/etc directory that gets created, and I notice some of the packages disappear (build-time only dependencies? not yet verified) plus the package.json files seem to be increasing in size slightly. The resulting package does seem to work at runtime.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67406</commentid>
    <comment_count>2</comment_count>
    <who name="Brendan Le Foll">brendan.le.foll</who>
    <bug_when>2016-10-20 06:22:52 +0000</bug_when>
    <thetext>No real reason no, if that works then that sounds like a much better way of doing it. I would just be careful that npm gets called with --production --no-registry so that it doesn&apos;t go and do more things than it&apos;s supposed to.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67706</commentid>
    <comment_count>3</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-10-28 02:12:49 +0000</bug_when>
    <thetext>*** Bug 10517 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68113</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-11-08 17:26:25 +0000</bug_when>
    <thetext>Fixed in oe-core 90cb980a1c49de99a0aec00c0cd5fc1e165490a7.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70275</commentid>
    <comment_count>5</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-01-30 23:56:18 +0000</bug_when>
    <thetext>Re-opening to request back-port to morty.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70276</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-01-31 02:55:45 +0000</bug_when>
    <thetext>Unfortunately the patch for this issue appears to be the cause of bug 10760, so we&apos;ll have to get a fix for that one before backporting.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70277</commentid>
    <comment_count>7</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-01-31 02:56:17 +0000</bug_when>
    <thetext>(Accidentally changed stats - oops).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77967</commentid>
    <comment_count>8</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2017-11-05 20:26:48 +0000</bug_when>
    <thetext>So I&apos;m setting this back to fixed to indicate that it was fixed (in master, pyro and rocko), but I don&apos;t think we can backport it to any older release - there&apos;s just too much additional work around fixing the fallout.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>