|
@@ -65,6 +65,8 @@ function nodejs_fix_cpu_detection {
|
65
|
65
|
# fix for failing cpu detection during image build with qemu, see https://github.com/npm/npm/issues/19265
|
66
|
66
|
sed -i "s|require('os').cpus.*|1|g" "$rootdir/usr/lib/node_modules/npm/node_modules/worker-farm/lib/farm.js"
|
67
|
67
|
fi
|
|
68
|
+ # installing worker farm fixes the cpu detection bug
|
|
69
|
+ $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g worker-farm@1.5.2 --save
|
68
|
70
|
}
|
69
|
71
|
|
70
|
72
|
function mesh_install_nodejs {
|
|
@@ -138,8 +140,6 @@ function mesh_install_nodejs {
|
138
|
140
|
|
139
|
141
|
$mesh_install_nodejs_prefix npm config set unsafe-perm true
|
140
|
142
|
nodejs_fix_cpu_detection
|
141
|
|
- # installing worker farm fixes the cpu detection bug
|
142
|
|
- $mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g worker-farm@1.5.2 --save
|
143
|
143
|
$mesh_install_nodejs_prefix npm install --arch=$NPM_ARCH -g npm@${NPM_VERSION} --save
|
144
|
144
|
if [ -f "$rootdir/usr/local/bin/npm" ]; then
|
145
|
145
|
cp "$rootdir/usr/local/bin/npm" /usr/bin/npm
|