<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Yes, this patch fix this problem.<br><br></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small">Thanks!<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 5, 2016 at 3:13 PM, Paul Eggleton <span dir="ltr">&lt;<a href="mailto:paul.eggleton@linux.intel.com" target="_blank">paul.eggleton@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Right, this is the problem Brendan was describing - I believe I sent a patch<br>
to fix this already:<br>
<br>
<a href="http://patchwork.openembedded.org/patch/121039/" rel="noreferrer" target="_blank">http://patchwork.openembedded.org/patch/121039/</a><br>
<br>
Cheers,<br>
Paul<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, 05 May 2016 09:51:53 Fabio Berton wrote:<br>
&gt; Hi Paul,<br>
&gt;<br>
&gt; When running:<br>
&gt; recipetool create &quot;npm://<a href="http://registry.npmjs.org" rel="noreferrer" target="_blank">registry.npmjs.org</a>;name=grunt-cli;version=1.1.0&quot;<br>
&gt;<br>
&gt; I get this error:<br>
&gt;<br>
&gt; NOTE: Unpacking abbrev-1.0.7.tgz to<br>
&gt; /tmp/recipetool-tXXZDi/npmpkg/node_modules/nopt/node_modules/abbrev/<br>
&gt; Traceback (most recent call last):<br>
&gt;   File &quot;sources/openembedded-core/scripts/recipetool&quot;, line 116, in &lt;module&gt;<br>
&gt; ret = main()<br>
&gt;   File &quot;sources/openembedded-core/scripts/recipetool&quot;, line 107, in main<br>
&gt;     ret = args.func(args)<br>
&gt;   File &quot;sources/openembedded-core/scripts/lib/recipetool/create.py&quot;, line<br>
&gt; 561, in create_recipe<br>
&gt;     handler.process(srctree_use, classes, lines_before, lines_after,<br>
&gt; handled, extravalues)<br>
&gt;   File &quot;sources/openembedded-core/scripts/lib/recipetool/create_npm.py&quot;,<br>
&gt; line 133, in process<br>
&gt;     license = self._handle_license(pdata)<br>
&gt;   File &quot;sources/openembedded-core/scripts/lib/recipetool/create_npm.py&quot;,<br>
&gt; line 44, in _handle_license<br>
&gt;     if &#39;license&#39; in data:<br>
&gt; TypeError: argument of type &#39;NoneType&#39; is not iterable<br>
&gt;<br>
&gt;<br>
&gt; On Thu, May 5, 2016 at 7:57 AM, Brendan Le Foll &lt;<a href="mailto:brendan.le.foll@intel.com">brendan.le.foll@intel.com</a>&gt;<br>
&gt;<br>
&gt; wrote:<br>
&gt; &gt; On Thu, May 05, 2016 at 07:10:43PM +1200, Paul Eggleton wrote:<br>
&gt; &gt; &gt; Note also that devtool add / recipetool create are capable of creating<br>
&gt; &gt;<br>
&gt; &gt; pretty<br>
&gt; &gt;<br>
&gt; &gt; &gt; complete recipes for npm packages where licenses are also correctly set<br>
&gt; &gt;<br>
&gt; &gt; per<br>
&gt; &gt;<br>
&gt; &gt; &gt; package (so you get them in the image manifest). I&#39;d strongly recommend<br>
&gt; &gt;<br>
&gt; &gt; using<br>
&gt; &gt;<br>
&gt; &gt; &gt; it for this; if you have any issues please let me know.<br>
&gt; &gt;<br>
&gt; &gt; So actually it errors in this case because of a test package in the<br>
&gt; &gt; resolve module (this shows the issue quicker/easier) see:<br>
&gt; &gt; $ recipetool create &quot;npm://<a href="http://registry.npmjs.org" rel="noreferrer" target="_blank">registry.npmjs.org</a>;name=resolve;version=1.1.7&quot;<br>
&gt; &gt;<br>
&gt; &gt; There&#39;s a node_modules dir inside test/ it gets taken as if npm had<br>
&gt; &gt; resolved/download a dep when in fact it hasn&#39;t. Since node packages<br>
&gt; &gt; can and do ship their own deps with them sometimes, I think the only<br>
&gt; &gt; fix would be in npm_split_package_dirs to walk 1 level of the ${PN}<br>
&gt; &gt; dir only so that:<br>
&gt; &gt;<br>
&gt; &gt; ${PN}/node_modules -&gt; taken<br>
&gt; &gt; ${PN}/tests/node_modules -&gt; ignored<br>
&gt; &gt; ${PN}/node_modules/${PN}/node_modules -&gt; taken<br>
&gt; &gt;<br>
&gt; &gt; Cheers,<br>
&gt; &gt; Brendan<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
<br>
Paul Eggleton<br>
Intel Open Source Technology Centre<br>
</div></div></blockquote></div><br></div>