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

Usage information shows something like 'index.js develop' instead of 'gatsby develop' #5838

Closed
LujunWeng opened this issue Jun 11, 2018 · 7 comments
Labels
help wanted Issue with a clear description that the community can help with. status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change

Comments

@LujunWeng
Copy link

LujunWeng commented Jun 11, 2018

Relevant information

When I took a look at the usage of gatsby, it showed something like this

$ gatsby --help
Usage: index.js <command> [options]

Commands:
  index.js develop                   Start development server. Watches files, rebuilds, and hot reloads if something changes  index.js build                     Build a Gatsby project.
  index.js serve                     Serve previously built Gatsby site.
  index.js new [rootPath] [starter]  Create new Gatsby project.

Options:
  --verbose      Turn on verbose output                                                           [boolean] [default: false]  --no-color     Turn off the color in output                                                     [boolean] [default: false]  -h, --help     Show help                                                                                         [boolean]  -v, --version  Show version number                                                                               [boolean]

They should be gatsby instead of index.js.

Environment (if relevant)

  • Gatsby version (npm list gatsby): gatsby@1.9.149
  • gatsby-cli version (gatsby --version): 1.1.53
  • Node.js version: v8.11.2
  • Operating System: Windows 10 (1803)
@ryanditjia
Copy link
Contributor

I’m at gatsby-cli@1.1.58 and I’m not seeing index.js. Can you try upgrading and see if it fixes?

@LujunWeng
Copy link
Author

@ryanditjia
Got the same result after upgrading to 1.1.58

LujunW@DESKTOP MINGW64 /d/GitHub
$ gatsby -v
1.1.58

LujunW@DESKTOP MINGW64 /d/GitHub
$ gatsby --help
Usage: index.js <command> [options]

Commands:
  index.js develop                   Start development server. Watches files, rebuilds, and hot reloads if something
                                     changes
  index.js build                     Build a Gatsby project.
  index.js serve                     Serve previously built Gatsby site.
  index.js info                      Get environment information for debugging and issue reporting
  index.js new [rootPath] [starter]  Create new Gatsby project.

Options:
  --verbose      Turn on verbose output                                                        [boolean] [default: false]  --no-color     Turn off the color in output                                                  [boolean] [default: false]  -h, --help     Show help                                                                                      [boolean]  -v, --version  Show version number          

@LujunWeng
Copy link
Author

LujunWeng commented Jun 12, 2018

I took a look at the code. It uses $0 to fetch the command name dynamically and I also see some discussions on this in yargs issues. Why don't we use gatsby instead of $0? The name won't change anyway.

@m-allanson
Copy link
Contributor

Thank for the report @LujunWeng! It seems there's an open PR to fix this in yargs: yargs/yargs#1143. Waiting for that to be merged seems like a good fix here.

@m-allanson m-allanson added help wanted Issue with a clear description that the community can help with. status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change labels Jun 18, 2018
@PhiLhoSoft
Copy link

I came here looking if this has been already reported, as I noticed this too.

As a heads up, it seems the yargs issue has been merged some days ago.

Minor problem, but good to see it addressed... 😄

@KyleAMathews
Copy link
Contributor

Due to the high volume of issues, we're closing out older ones without recent activity. Please open a new issue if you need help!

@umstek
Copy link

umstek commented Sep 29, 2018

gatsby-cli v2.4.2, I still see the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with. status: blocked This issue/PR can't be solved at the moment and shouldn't be closed/merged type: maintenance An issue or pull request describing a change that isn't a bug, feature or documentation change
Projects
None yet
Development

No branches or pull requests

6 participants