Skip to content

RaspberryPi issue #1841

Open
Open

Description

@mbatorski

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");).

Activity

  1. scottgonzalez commented on Mar 5, 2024

    @scottgonzalez
    Contributor

    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.

  2. scottgonzalez commented on Mar 5, 2024

    @scottgonzalez
    Contributor

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

  3. lbineau commented on Mar 29, 2024

    @lbineau

    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

  4. PizzaProgram commented on Feb 1, 2025

    @PizzaProgram

    (npm last update is 3years ago, while github is 1year ago)

    But the Release version number here matches the one at npm : 2.1.0
    I think @johnny-five would update on npm too, if anything would change.

    IMHO this issue can be closed.

  5. PizzaProgram commented on Feb 1, 2025

    @PizzaProgram

    @scottgonzalez I take it back. I see now that Serial has been updated in 2023, but no new release has been presented.
    So you are right, the source downloaded directly from here (and not from "release" page) is newer than the one on npm.

    Maybe we should ask to make a new 2.2.20250201 release ?
    (it is always a good practice to include a date in the numbering)

  6. scottgonzalez commented on Feb 1, 2025

    @scottgonzalez
    Contributor

    I wouldn't hold your breath for a release. I gave up waiting for one a long time ago and started using my own fork (also forked firmata to use an updated serialport which gets pulled into johnny-five). I point to the tip of https://github.com/scottgonzalez/johnny-five/tree/blue-owl (currently using "johnny-five": "scottgonzalez/johnny-five#f548f9aed5b1992cb8f847e95b5a4583f952fc73" as my dependency) for my projects.

    As for using a date as a patch version, that is definitely not a good practice. If you want to include a date in the version, it should be in the build metadata, e.g., 2.2.0+20250201, but I personally would not recommend that either.

    @dtex can you close this issue?

  7. dtex commented on Feb 1, 2025

    @dtex
    Collaborator

    I should ping @rwaldron. I think he believes I can publish releases at npm, but that's the one privilege I don't have.

  8. PizzaProgram commented on Feb 2, 2025

    @PizzaProgram

    @scottgonzalez Actually my real goal is to find a stable Node-Red module, that would properly handle Firmata.
    (Currently I'm using RPi-Pico boards with Configurable-Firmata firmware on them.)

    The Node-Red's built-in module called: 35-aruino, based on Firmata-io, can not properly handle:

    • Re-Deploy /
    • USB-disconnect /
    • reconnect /
    • wrong pin number / << the whole NR is crashing
    • (temp reading)

    The whole Arduino module is freezing down. I've checked the codebase of those files, and I think the main problem is:

    • there is not any serial.on('error')... present,
    • no timeout of data flow
    • nor enough try..catch .

    So I thought what if Johnny-five can handle it better? (Was big fan of the movie as a child 🤖 .)

  9. tbaltrushaitis commented on Mar 7, 2025

    @tbaltrushaitis

    Was big fan of the movie as a child 🤖

    💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions