]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
npm.bbclass: Fix building node modules with npm@5
authorBöszörményi Zoltán <zboszor@pr.hu>
Thu, 1 Feb 2018 13:08:30 +0000 (14:08 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 6 Feb 2018 10:54:34 +0000 (10:54 +0000)
commit2d7d2a460842c8747df17990970f22f4a11f36f6
treee3f530be3d0e949f0fb2f65e794bc5698bd2a858
parentaa168ee7f785ff007ca645db57698883922b5eb3
npm.bbclass: Fix building node modules with npm@5

npm cache clear throws an error with npm@5 and suggests to
use npm cache verify instead. But our cache is actually empty,
so use npm cache clear --force.

npm install in the source directory creates symlinks with npm@5.

Use a combination of npm pack and npm install module-version.tgz
that works the same way with older and new npm versions and is
guaranteed to create actual copies instead of directory symlinks.

This change allows using nodejs 8.x LTS, tested with 8.9.4.

Signed-off-by: Zoltán Böszörményi <zboszor@pr.hu>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/npm.bbclass