<?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>11015</bug_id>
          
          <creation_ts>2017-02-04 01:12:49 +0000</creation_ts>
          <short_desc>devtool: fails to add node.js project that has local dependency</short_desc>
          <delta_ts>2025-03-27 14:56:00 +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>NEW</bug_status>
          <resolution></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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Henry Bruce">henry.bruce</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>frederic.martinsons</cc>
    
    <cc>jeanmarie.lemetayer</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>rebecca.swee.fun.chang</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>70434</commentid>
    <comment_count>0</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-02-04 01:12:49 +0000</bug_when>
    <thetext>Node.js can specify dependencies that are in local folders instead of registry. This is used when developing a module. Instead of defining dependencies by version

  &quot;dependencies&quot;: {
    &quot;my-node-test-lib&quot;: &quot;0.1.0&quot;
  }

you specify a path

  &quot;dependencies&quot;: {
    &quot;my-node-test-lib&quot;: &quot;../my-node-test-lib&quot;
  }

If you use the &quot;local&quot; form of dependency specification, devtool fails as it still looks for module in the registry and obviously it isn&apos;t there. 
 
Observed behavior
-----------------
$ devtool add my-node-test-app ~/Projects/nodejs/my-node-test-app/
ERROR: Command &apos;recipetool --color=always create -o /tmp/devtoolfsp88t_c &quot;/home/hbruce/Projects/nodejs/my-node-test-app&quot;  -N my-node-test-app&apos; failed:
npm ERR! 404 Registry returned 404 for GET on https://registry.npmjs.org/my-node-test-lib
npm ERR! 404
npm ERR! 404 &apos;my-node-test-lib&apos; is not in the npm registry.

Expected behavior 
-----------------
Devtool completes successfully, provided path can be satisfied</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70436</commentid>
    <comment_count>1</comment_count>
    <who name="Henry Bruce">henry.bruce</who>
    <bug_when>2017-02-04 01:22:49 +0000</bug_when>
    <thetext>Adding all 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 my-node-test-lib https://github.com/whbruce/my-node-test-lib.git
$ devtool add my-node-test-app https://github.com/whbruce/my-node-test-app.git</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78769</commentid>
    <comment_count>2</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-12-20 10:14:58 +0000</bug_when>
    <thetext>I have also run into similar issue in crops/esdk-container on v2.4.1-rc1

sdkuser@b6a396ad36ee:/workdir$ devtool add npm &quot;npm://registry.npmjs.org;name=forever;version=0.15.1&quot;
NOTE: Starting bitbake server...
NOTE: Starting bitbake server...
NOTE: Fetching npm://registry.npmjs.org;name=forever;version=0.15.1;noverify=1...
Loading cache: 100% |################################################################################################################################################################################| Time: 0:00:01
Loaded 1272 entries from dependency cache.
Parsing recipes: 100% |##############################################################################################################################################################################| Time: 0:00:00
Parsing of 816 .bb files complete (815 cached, 1 parsed). 1273 targets, 43 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing PROVIDES &apos;nodejs-native&apos;. Close matches:
  nss-native
  tzcode-native
  nspr-native
ERROR: Failed to fetch URL npm://registry.npmjs.org;name=forever;version=0.15.1;noverify=1
ERROR: Command &apos;. /workdir/layers/build/oe-init-build-env /workdir &gt; /dev/null &amp;&amp; script -e -q -c &quot;recipetool --color=always create --devtool -o /tmp/devtool1vf6gt2j &apos;npm://registry.npmjs.org;name=forever;version=0.15.1&apos;  -x /workdir/workspace/sources/devtoolsrcesg8at_8 -N npm&quot; /dev/null&apos; failed</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87352</commentid>
    <comment_count>3</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2020-05-28 08:08:24 +0000</bug_when>
    <thetext>Jean-Marie are you interested in working on this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95199</commentid>
    <comment_count>4</comment_count>
    <who name="Frédéric Martinsons">frederic.martinsons</who>
    <bug_when>2023-03-26 07:12:44 +0000</bug_when>
    <thetext>It seems the same problem I ran into for rust recipe
see this series that is under discussion: https://patchwork.yoctoproject.org/project/oe-core/list/?series=11510

And in particularly the patch 1 and 4.

cargo based recipe has a &quot;patch&quot; mechanism to allow override dependencies to get the lib locally.

I don&apos;t know node.js and npm at all but if there is such a mechanism also, it should be used in npm.bbclass and externalsrc.bbclass should also be modified in the same way I did for cargo.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>