youtube-music: [partially works] doesn't build for linux armhf/arm64

doesn’t build on Ubuntu arm64 for Raspberry Pi

steps I followed:

  1. git clone https://github.com/th-ch/youtube-music
  2. cd youtube-music
  3. yarn
  4. yarn start (to start the app)

when running yarn I get this error:

00h00m00s 0/0: : ERROR: There are no scenarios; must have at least one.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 27 (5 by maintainers)

Most upvoted comments

You can use the build for arm64/armhf at over 3.6.1

Hello! The main problem was with fpm package that require electron during build It downloads it automatically x86 version and their repo don’t include aarm64.

I am very thankful to this topics: https://github.com/th-ch/youtube-music/issues/85 https://github.com/jordansissel/fpm/issues/1801#issuecomment-919877499

The main repo of aarm64 build, my hero! https://github.com/jgresham/fpm-arm-binary

Main longread explanation how it works: https://github.com/signalapp/Signal-Desktop/issues/6063#issuecomment-1307001166

So, the solution is to build fpm by yourself and build any electron apps for aarm64 after.

// First install podman and run
podman run -it --platform=linux/arm64 ubuntu:20.04 bash

// Update vm
sudo apt update
sudo apt install -y curl git build-essential rpm

// Build aarm64 fpm
git clone https://github.com/jgresham/fpm-arm-binary
cd fpm-arm-binary/
chmod +x compile-script.sh
./compile-script.sh

// Make fpm usable by fpm command
sudo mv fpm-arm64-exe /usr/local/bin/fpm
sudo chmod +x /usr/local/bin/fpm
which fpm
fpm --version

// Install node with npm and pnpm
curl -fsSL https://deb.nodesource.com/setup_current.x | sudo -E bash -
sudo npm install -g npm@latest
npm install -g pnpm

// Build Youtube Music, Simple Note, Signal-Desktop, Discord, etc. Anything on Electron
export USE_SYSTEM_FPM=true
git clone https://github.com/th-ch/youtube-music
cd youtube-music
pnpm install --frozen-lockfile
pnpm dist:linux:rpm-arm64

here are the build instructions for linux arm so far (I added everything I did, so there might be some uneeded instructions):

Install dependencies

node.js

There are two ways to install node.js: using apt and the nodesource repo and using nvm (node version manager), I recommend using nvm because using the nodesource repo has broken system permissions multiple times for me.

curl is needed, but you can change it with wget if you use the correct flags.

nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
nvm install node

nodesource

curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt install nodejs -y

yarn


curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update && sudo apt install yarn -y

build youtube music

git clone https://github.com/th-ch/youtube-music.git
cd youtube-music
yarn --frozen-lockfile

build a appimage

yarn build:linux --linux appimage --armv7l

build a deb

yarn build:linux --linux deb --armv7l

I had to run yarn --frozen lockfile, yarn build:linux --linux appimage --armv7l & yarn build:linux --linux deb --armv7l as root. otherwise the commands failed. change armv7l with arm64 for building for Linux arm64.

notes

  • the downloader plugin doesn’t work.

Hey @Itai-Nelken, thank you for the detailed feedback! Glad to see it working 😃 For the downloader issue, the mp3 conversion is done with the WebAssembly version of FFmpeg and not sure of how well it is supported on ARM 😬 - I don’t have an ARM machine at the moment to test, keeping the issue opened to track progress on this!