davglass / bambu-cli

CLI tool for Bambu Labs printers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CLI Crash

DGEllis opened this issue · comments

Hello,

I built a fresh VM on AlmaLinux 9.3, installed Docker in preparation for bambu-farm, installed NodeJS 20. When I attempt to log in, I get the following:

[dge@farmstand ~]$ bambu-cli login
/usr/local/lib/node_modules/bambu-cli/bin/cli.js:114
if (!args.id && machines.length === 1) {
^

TypeError: Cannot read properties of undefined (reading 'length')
at Object. (/usr/local/lib/node_modules/bambu-cli/bin/cli.js:114:26)
at Module._compile (node:internal/modules/cjs/loader:1241:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
at Module.load (node:internal/modules/cjs/loader:1091:32)
at Module._load (node:internal/modules/cjs/loader:938:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
at node:internal/main/run_main_module:23:47

Node.js v20.9.0
[dge@farmstand ~]$

The same error occurs with bambu-cli status and bambu-cli ls

@DGEllis Comment out the whole function (lines 114 and the 4 under it), login, then uncomment them after you're logged in. This resolved it for me. I'm not a node person, so I don't know enough to fix the issue.

Just pushed a fix for this, version v1.0.16 should work as expected.

Just pushed a fix for this, version v1.0.16 should work as expected.

Sorry to bump this months later, but this version isn't on npm. Is that intended?