johnny-five icon indicating copy to clipboard operation
johnny-five copied to clipboard

RaspberryPi issue

Open technic404 opened this issue 2 years ago • 9 comments

I'm using Raspberry Pi 4B.

code:

var five = require("johnny-five");
var board = new five.Board();

board.on("ready", function() {
    console.log('Ready!');
});

Error:

internal/deps/acorn/acorn/dist/acorn.js:4015
      (ch >= 0x41 /* A */ && ch м쀽 0聸耵C  *РØ 肪࠯, ɼ|逊 Ȩ   0䀨䡣jĠ>= 0x¶1 /ЪĠá */(&₦耠䁣聨ࠨ¼耿 8¸‷䉁Ƞ/쀪ဠࡺ */)
                                ^^

SyntaxError: Unexpected identifier

at Object.<anonymous> (/home/user/Desktop/node_modules/johnny-five/lib/repl.js:2:14)

As i was testing the issue, error is displayed in the first line (var five = require("johnny-five");).

technic404 avatar Feb 17 '24 20:02 technic404

I have no issues with my Pi 400s.

But the provided error code looks more like a broken source file than an issue with Johnny-Five. It should be impossible for a Johnny-Five error to produce a SyntaxError.

scottgonzalez avatar Mar 05 '24 00:03 scottgonzalez

I'd try rm -rf node_modules && npm install.

scottgonzalez avatar Mar 05 '24 00:03 scottgonzalez

In addition you can try to install the main branch instead of npm (npm last update is 3years ago, while github is 1year ago). https://github.com/rwaldron/johnny-five?tab=readme-ov-file#source-code

lbineau avatar Mar 29 '24 10:03 lbineau