You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being faced with errors is usual, but oclif's errors are not very helpful most of the time.
What is the expected behavior?
Either expose the root of the error more clearly. For instance I'm updating my CLI from v1 right now, and one of the subcommands is buggy and I really can't find any infos... here is the output (not asking for support on this I'll open a separate issue if needed, just to prove my point):
Running my cli subcommand:
DEBUG=* mtb resolve-to-nuke --help
configreadingcoreplugin ~/mtb-cli +0ms config loadJSON ~/mtb-cli/package.json +0msconfigloadJSON ~/mtb-cli/oclif.manifest.json +0msconfigloadJSON ~/mtb-cli/.oclif.manifest.json +0msconfig:@mtb/cliloadingIDsfrom ~/mtb-cli/dist/commands +0msconfig:@mtb/clifoundcommands['mono','resolve-to-nuke','mkthumbnail'] +20msconfig:@mtb/cli(require) ~/mtb-cli/dist/commands/mono +15msconfigreadinguserpluginspjson/Users/mel/.local/share/mtb/package.json +0msconfigloadJSON/Users/mel/.local/share/mtb/package.json +0ms(node:82496)[MODULE_NOT_FOUND]ModuleLoadErrorPlugin: @mtb/cli: [MODULE_NOT_FOUND]requirefailedtoload ~/mtb-cli/dist/commands/resolve-to-nukemodule: @oclif/core@1.6.1task: toCachedplugin: @mtb/cliroot: ~/mtb-cliSee more details with DEBUG=*(Use `node --trace-warnings ...` to show where the warning was created)ModuleLoadError Plugin: @mtb/cli: [MODULE_NOT_FOUND]requirefailedtoload ~/mtb-cli/dist/commands/resolve-to-nukeatFunction.loadWithData(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/module-loader.js:85:23)atfetch(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/plugin.js:181:83)atPlugin.findCommand(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/plugin.js:197:27)at ~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/plugin.js:234:73atArray.map(<anonymous>)atPlugin._manifest(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/plugin.js:232:58)atasyncPlugin.load(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/plugin.js:128:25)atasyncConfig.load(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/config.js:86:9)atasyncFunction.load(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/config/config.js:80:9)atasyncObject.run(~/node_modules/.pnpm/@oclif+core@1.6.1/node_modules/@oclif/core/lib/main.js:44:20)module: @oclif/core@1.6.1task: toCachedplugin: @mtb/cliroot: ~/mtb-cliSee more details with DEBUG=* config loading plugins [ '@oclif/plugin-help', '@oclif/plugin-plugins', '@oclif/plugin-autocomplete'
] +4msconfigreadingcoreplugin ~/mtb-cli/node_modules/@oclif/plugin-autocomplete +0msconfigloadJSON ~/mtb-cli/node_modules/@oclif/plugin-autocomplete/package.json +0msconfigreadingcoreplugin ~/node_modules/.pnpm/@oclif+plugin-help@5.1.12/node_modules/@oclif/plugin-help +0msconfigloadJSON ~/node_modules/.pnpm/@oclif+plugin-help@5.1.12/node_modules/@oclif/plugin-help/package.json +0msconfigreadingcoreplugin ~/node_modules/.pnpm/@oclif+plugin-plugins@2.1.0/node_modules/@oclif/plugin-plugins +0msconfigloadJSON ~/node_modules/.pnpm/@oclif+plugin-plugins@2.1.0/node_modules/@oclif/plugin-plugins/package.json +0msconfigloadJSON ~/mtb-cli/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json +0msconfigloadJSON ~/node_modules/.pnpm/@oclif+plugin-help@5.1.12/node_modules/@oclif/plugin-help/oclif.manifest.json +0msconfigloadJSON ~/node_modules/.pnpm/@oclif+plugin-plugins@2.1.0/node_modules/@oclif/plugin-plugins/oclif.manifest.json +0msconfig:@oclif/plugin-autocompleteusingmanifestfrom ~/mtb-cli/node_modules/@oclif/plugin-autocomplete/oclif.manifest.json +0msconfig:@oclif/plugin-helpusingmanifestfrom ~/node_modules/.pnpm/@oclif+plugin-help@5.1.12/node_modules/@oclif/plugin-help/oclif.manifest.json +0msconfig:@oclif/plugin-pluginsusingmanifestfrom ~/node_modules/.pnpm/@oclif+plugin-plugins@2.1.0/node_modules/@oclif/plugin-plugins/oclif.manifest.json +0msconfigconfigdone +33msconfigstartinithook +0msconfiginithookdone +1ms›Error: Commandresolve-to-nuke not found.
The text was updated successfully, but these errors were encountered:
This is a big problem — when this does happen, one has no choice but to play a game of cat and mouse and start commenting out lines in the command that's failing to load.
There doesn't seem to be an easy way to access the source error.
IMO the CLI should throw explicitly instead of eating up these errors.
Feature Request
What is the current behavior?
Being faced with errors is usual, but oclif's errors are not very helpful most of the time.
What is the expected behavior?
Either expose the root of the error more clearly. For instance I'm updating my CLI from v1 right now, and one of the subcommands is buggy and I really can't find any infos... here is the output (not asking for support on this I'll open a separate issue if needed, just to prove my point):
Running my cli subcommand:
DEBUG=* mtb resolve-to-nuke --help
The text was updated successfully, but these errors were encountered: