Skip to content

Missing commander dependency #355

Open

Description

@joshkel

I looked into using the jsmodbus CLI but encountered an error:

  .command('fc01 <host> <unitId> <range>')
   ^

TypeError: program.command is not a function

It appears that this is because jsmodbus lists its commander@^3.0.2 dependency under devDependencies, so it's not installed at runtime, and the package in my project instead gets my project's commander@^12.1.0, which isn't compatible.

I started looking into opening a PR for this, but several of jsmodbus's dependencies are out of date. (I couldn't install packages because the Node.js APIs have changed for serialport, and updating serialport exposed issues with an out-of-date TypeScript, and updating TypeScript apparently exposed issues with tslint.) If you're interested in a PR that updates several packages, I can work on one, but I didn't want to make larger changes without checking with you.

Thank you.

Activity

  1. stefanpoeter commented on Sep 28, 2025

    @stefanpoeter
    Member

    Hi @joshkel ,

    updating the dependencies sounds great. Something I had on my bucket list for some time now. I would be more than happy if you want to open up a PR. For compatibility reasons I would make that version 5.0.0.

  2. Barneey96 commented on Sep 10, 2026

    @Barneey96

    Hello @stefanpoeter , @joshkel ,

    I opened a general PR for node 20+ support: #360 which would also fix this.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions