{"record":{"id":"a77c6cd5b3fff311","repo":"slint-ui/slint","slug":"unknown-command-command","errorCode":null,"errorMessage":"unknown command: ${command}","messagePattern":"unknown command: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"api/node/scripts/packaging.mts","lineNumber":253,"sourceCode":"            });\n            break;\n        }\n        case \"pack-dev-meta\": {\n            const [version, dest, ...targets] = args;\n            await packDevMeta({\n                version,\n                dest,\n                targets: targets.length ? targets : undefined,\n            });\n            break;\n        }\n        case \"publish-all\": {\n            const [dir, registry, tag] = args;\n            await publishAll({ dir, registry, tag: tag || undefined });\n            break;\n        }\n        default:\n            throw new Error(`unknown command: ${command}`);\n    }\n}\n\n// Run as a CLI when executed directly (rather than imported).\nif (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {\n    main(process.argv.slice(2)).catch((error) => {\n        console.error(error);\n        process.exit(1);\n    });\n}\n","sourceCodeStart":235,"sourceCodeEnd":264,"githubUrl":"https://github.com/slint-ui/slint/blob/bb937076de3f7919766c1f25e2e969367cf77e9a/api/node/scripts/packaging.mts#L235-L264","documentation":"packaging.mts is a command-dispatch CLI: main() switches on the first CLI argument and each case handles one packaging subcommand (pack, pack-dev-meta, publish-all, ...). This Error is the default branch — a generic guard saying the subcommand name given on the command line matches no known handler, usually a typo or an invocation of the script with no/incorrect arguments.","triggerScenarios":"Running the script with an unrecognized first argument, e.g. `node packaging.mts publlish-all ...`.","commonSituations":"Typo in the subcommand, following outdated docs, scripting the tool with a command removed in a newer version.","solutions":["Use one of the supported commands (e.g. publish-all) exactly as spelled.","Inspect the switch statement in packaging.mts main() to list valid commands.","Fix automation scripts to use the current command names."],"exampleFix":"// before\nnode packaging.mts publish --dir dist\n// after\nnode packaging.mts publish-all dist","handlingStrategy":"validation","validationCode":"const VALID = ['publish-all'];\nif (!VALID.includes(command)) throw new Error(`unknown command: ${command}`);","typeGuard":null,"tryCatchPattern":"main(process.argv.slice(2)).catch((e) => {\n  console.error(e.message);\n  process.exitCode = 1;\n});","preventionTips":["Check the script's switch statement or --help for the exact command names.","Validate arguments in wrapper scripts before invoking the tool.","Pin script versions in CI to avoid renamed commands."],"tags":["nodejs","cli","invalid-argument"],"backgroundTag":"invalid-cli-argument","analyzedSha":"bb937076de3f7919766c1f25e2e969367cf77e9a","analyzedAt":"2026-09-16T01:37:20.251Z","contentChangedAt":"2026-09-16T01:37:20.251Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}