Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseCommand Documentation #1060

Closed
JensAstrup opened this issue Apr 19, 2024 · 3 comments
Closed

BaseCommand Documentation #1060

JensAstrup opened this issue Apr 19, 2024 · 3 comments
Labels
needs more info stale No recent activity.

Comments

@JensAstrup
Copy link

Describe the bug
Copying and pasting the exact example from the documentation on creating a BaseCommand does not result in a functional command that can be used.

To Reproduce

  1. Copy the code used in the example
  2. Attempt to start the CLI: ./bin/dev.js
  3. Note that said command does not appear

Expected behavior
I expected to be able to utilize a BaseCommand if I followed the instructions (or at least get some helpful debug output about why that didn't work :'( )

Environment (please complete the following information):

  • OS & version: [e.g. MacOS Monterey, Ubuntu 20.04.4 LTS, Windows 10]: MacOS 13.6.6
  • Shell/terminal & version [e.g. bash-3.2, bash-5.0, zsh 5.8, powershell 7.2.4, cmd.exe, Windows Terminal w/ powershell, etc... ]: zsh 5.9 (x86_64-apple-darwin22.0)
@mdonnalley
Copy link
Contributor

@JensAstrup I'm not able to reproduce this with the following:

  • oclif generate gh-1060 --yes
  • copy example into src/commands/hello/index.ts
  • bin/dev.js --name oclif

Is there anything I'm missing? Also you can get additional logs if you set the DEBUG=* in your environment

@JensAstrup
Copy link
Author

Nope, not missing anything 🤔 I used DEBUG, just felt wanting of more detail. Here's what I have using oclif/4.5.0 darwin-arm64 node-v21.7.1

Apologies if this is just me, my copy/paste job made it seem like an oclif issue - now I've got that sneaking feeling that I've overlooked something minor that'll have me 🤦

] +6ms
  config:espresso (import) /Users/jens/projects/espresso/src/commands/github/pending-review.ts +2s
Warning: Error
    at Plugin.warn (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:372:17)
    at /Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:276:30
    at async Promise.all (index 4)
    at async Plugin._manifest (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:257:24)
    at async Plugin.load (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:208:25)
    at async PluginLoader.loadRoot (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin-loader.js:67:13)
    at async Config.load (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/config.js:267:27)
    at async Function.load (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/config.js:157:9)
    at async run (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/main.js:59:20)
    at async file:///Users/jens/projects/espresso/bin/dev.js:5:1
module: @oclif/core@3.26.0
task: findCommand (hello:hello)
plugin: espresso
root: /Users/jens/projects/espresso
See more details with DEBUG=*
Warning: Error
    at Plugin.warn (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:372:17)
    at /Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:276:30
    at async Promise.all (index 4)
    at async Plugin._manifest (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:257:24)
    at async Plugin.load (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin.js:208:25)
    at async PluginLoader.loadRoot (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/plugin-loader.js:67:13)
    at async Config.load (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/config.js:267:27)
    at async Function.load (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/config/config.js:157:9)
    at async run (/Users/jens/projects/espresso/node_modules/@oclif/core/lib/main.js:59:20)
    at async file:///Users/jens/projects/espresso/bin/dev.js:5:1
module: @oclif/core@3.26.0
task: findCommand (hello:hello)
plugin: espresso
root: /Users/jens/projects/espresso
See more details with DEBUG=*
  config:espresso (import) /Users/jens/projects/espresso/src/commands/shortcut/at-risk.ts +132ms
  config:espresso (import) /Users/jens/projects/espresso/src/commands/shortcut/missing-points.ts +0ms
  config:espresso (import) /Users/jens/projects/espresso/src/commands/shortcut/stalled-in-dev.ts +0ms

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale No recent activity. label May 20, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info stale No recent activity.
Projects
None yet
Development

No branches or pull requests

2 participants