Tidying
This commit is contained in:
parent
115781093c
commit
cefafc1430
|
@ -65,6 +65,8 @@ function nodejs_fix_cpu_detection {
|
||||||
# fix for failing cpu detection during image build with qemu, see https://github.com/npm/npm/issues/19265
|
# fix for failing cpu detection during image build with qemu, see https://github.com/npm/npm/issues/19265
|
||||||
sed -i "s|require('os').cpus.*|1|g" "$rootdir/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js"
|
sed -i "s|require('os').cpus.*|1|g" "$rootdir/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js"
|
||||||
fi
|
fi
|
||||||
|
# installing worker farm fixes the cpu detection bug
|
||||||
|
$mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g worker-farm@1.5.2 --save
|
||||||
}
|
}
|
||||||
|
|
||||||
function mesh_install_nodejs {
|
function mesh_install_nodejs {
|
||||||
|
@ -138,8 +140,6 @@ function mesh_install_nodejs {
|
||||||
|
|
||||||
$mesh_install_nodejs_prefix npm config set unsafe-perm true
|
$mesh_install_nodejs_prefix npm config set unsafe-perm true
|
||||||
nodejs_fix_cpu_detection
|
nodejs_fix_cpu_detection
|
||||||
# installing worker farm fixes the cpu detection bug
|
|
||||||
$mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g worker-farm@1.5.2 --save
|
|
||||||
$mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
|
$mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
|
||||||
if [ -f "$rootdir/usr/local/bin/npm" ]; then
|
if [ -f "$rootdir/usr/local/bin/npm" ]; then
|
||||||
cp "$rootdir/usr/local/bin/npm" /usr/bin/npm
|
cp "$rootdir/usr/local/bin/npm" /usr/bin/npm
|
||||||
|
|
Loading…
Reference in New Issue