Bob Mottram 7 年之前
父節點
當前提交
cefafc1430
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. 2
    2
      src/freedombone-utils-nodejs

+ 2
- 2
src/freedombone-utils-nodejs 查看文件

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