소스 검색

Also do the downgrade trick for mesh install of peertube

Bob Mottram 7 년 전
부모
커밋
4c5381a018
1개의 변경된 파일12개의 추가작업 그리고 1개의 파일을 삭제
  1. 12
    1
      src/freedombone-app-peertube

+ 12
- 1
src/freedombone-app-peertube 파일 보기

@@ -653,7 +653,7 @@ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/source
653 653
 apt-get -y update
654 654
 apt-get -yq install yarn
655 655
 
656
-#npm install --arch=$NPM_ARCH -g yarn
656
+#npm install --arch=$NPM_ARCH -g yarn@1.5.1
657 657
 #if [ ! "\$?" = "0" ]; then
658 658
 #    echo $'PeerTube Failed to install yarn'
659 659
 #    exit 79353234
@@ -675,11 +675,22 @@ if [ ! "\$?" = "0" ]; then
675 675
     echo $'PeerTube failed to run yarn install'
676 676
     exit 63754235
677 677
 fi
678
+if ! npm install --arch=$NPM_ARCH -g npm@4; then
679
+    # https://github.com/KraigM/homebridge-harmonyhub/issues/119
680
+    echo $'Failed to downgrade npm'
681
+    exit 3476835
682
+fi
683
+cp /root/.npm-global/bin/npm /usr/local/bin/npm
678 684
 npm install --arch=$NPM_ARCH
679 685
 if [ ! "\$?" = "0" ]; then
680 686
     echo $'PeerTube failed to install peertube'
681 687
     exit 7835243
682 688
 fi
689
+if ! npm install --arch=$NPM_ARCH -g "npm@${NPM_VERSION}"; then
690
+    echo $'Failed to restore npm after downgrade'
691
+    exit 5737583
692
+fi
693
+cp /root/.npm-global/bin/npm /usr/local/bin/npm
683 694
 npm run build --arch=$NPM_ARCH
684 695
 if [ ! "\$?" = "0" ]; then
685 696
     echo $'PeerTube failed to build peertube'