Bob Mottram 7 年 前
コミット
cefafc1430
共有1 個のファイルを変更した2 個の追加2 個の削除を含む
  1. 2
    2
      src/freedombone-utils-nodejs

+ 2
- 2
src/freedombone-utils-nodejs ファイルの表示

@@ -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