munshkr / flok

Web-based P2P collaborative editor for live coding sounds and images
https://flok.cc
GNU General Public License v3.0
255 stars 39 forks source link

Problems installing on Raspberry Pi 1 (aka Zero) #177

Open schmolmo opened 1 year ago

schmolmo commented 1 year ago

Hey there,

I'm trying to install both flok-web and flok-repl on a Raspberry Pi Model B (is this a very bad idea?). After installing Node v11.5.0 as per here, I had success installing flok-repl, but after running it for the first time, I get the following:

pi@raspberrypi:~ $ flok-repl
/home/pi/.npm-global/lib/node_modules/flok-repl/bin/flok-repl.js:3
import dotenv from "dotenv";
       ^^^^^^

SyntaxError: Unexpected identifier
    at new Script (vm.js:83:7)
    at createScript (vm.js:267:10)
    at Object.runInThisContext (vm.js:319:10)
    at Module._compile (internal/modules/cjs/loader.js:684:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:732:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:560:12)
    at Function.Module._load (internal/modules/cjs/loader.js:552:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:774:12)
    at executeUserCode (internal/bootstrap/node.js:342:17)

What could I be doing wrong? :-)

Could it be related to my Node.js install?

All best, moritz

munshkr commented 1 year ago

Hi @schmolmo ! I think you're using a very old version of Node. Can you try installing the latest? I see that there's a script for v16.3.0 here

schmolmo commented 1 year ago

Thanks for the hint! Sadly, the armv6 architecture doesn't seem to be supported by Node v16, when I run flok-web or flok-replI get:

pi@raspberrypi:~ $ flok-web

#
# Fatal error in , line 0
# Liftoff bailout should not happen. Cause: Armv6 not supported

#
#
#
#FailureMessage Object: 0xb59fd288
Illegal instruction

I found this workaround that I'd like to try, could you maybe point me to how I could build a version with this line changed in flok-web.js and flok-repl.js? Sadly I don't have much experience with using Node.js...

Thank you very much for your help!