[OE-core] npm class usage

Brendan Le Foll brendan.le.foll at intel.com
Thu May 5 10:57:43 UTC 2016


On Thu, May 05, 2016 at 07:10:43PM +1200, Paul Eggleton wrote:
> Note also that devtool add / recipetool create are capable of creating pretty 
> complete recipes for npm packages where licenses are also correctly set per 
> package (so you get them in the image manifest). I'd strongly recommend using 
> it for this; if you have any issues please let me know.

So actually it errors in this case because of a test package in the
resolve module (this shows the issue quicker/easier) see:
$ recipetool create "npm://registry.npmjs.org;name=resolve;version=1.1.7"

There's a node_modules dir inside test/ it gets taken as if npm had
resolved/download a dep when in fact it hasn't. Since node packages
can and do ship their own deps with them sometimes, I think the only
fix would be in npm_split_package_dirs to walk 1 level of the ${PN}
dir only so that:

${PN}/node_modules -> taken
${PN}/tests/node_modules -> ignored
${PN}/node_modules/${PN}/node_modules -> taken

Cheers,
Brendan



More information about the Openembedded-core mailing list