Repository: gatsbyjs/gatsby

Issue #34477: Could not find a suitable version of gatsby-cli
Created: 2022-01-13T11:58:45Z
Preliminary Checks

 This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
 This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions

Description
NOTE: I filled a fake URL to be able to publish the issue. In fact there is no reproducible Gatsby App test case, the issue is during project creation with Gatsby CLI, well before I even start to work on the Web App code.
After running npx gatsby new and making my choices, I got:
create-gatsby version 2.5.0



                                                   Welcome to Gatsby!



This command will generate a new Gatsby site for you in D:\Documents\Dev\projects\fullpipeumbrella\migration with the
setup you select. Let's answer some questions:



What would you like to call your site?
√ · Full Pipe Umbrella (Gatsby)
What would you like to name the folder where your site will be created?
√ migration/ gatsby_site_root
√ Will you be using a CMS?
· No (or I'll add it later)
√ Would you like to install a styling system?
· Sass
√ Would you like to install additional features with other plugins?
· Add the Google Analytics tracking script
· Add responsive images
· Add page meta tags with React Helmet
· Add an automatic sitemap
· Generate a manifest file

Great! A few of the selections you made need to be configured. Please fill in the options for each plugin now:


√ Configure the gatsby-plugin-google-analytics plugin.


Thanks! Here's what we'll now do:

    Create a new Gatsby site in the folder gatsby_site_root
    Get you set up to use Sass for styling your site
    Install gatsby-plugin-google-analytics, gatsby-plugin-image, gatsby-plugin-react-helmet, gatsby-plugin-sitemap,
gatsby-plugin-manifest, gatsby-plugin-mdx


√ Created site from template
√ Installed Gatsby
√ Installed plugins
√ Created site in gatsby_site_root
Setting-up plugins...
looking in old place

 ERROR

× Could not find a suitable version of gatsby-cli. Please report this issue at
https://www.github.com/gatsbyjs/gatsby/issues

Your new Gatsby site Full Pipe Umbrella (Gatsby) has been successfully created
at D:\Documents\Dev\projects\fullpipeumbrella\migration\gatsby_site_root.
Start by going to the directory with

  cd gatsby_site_root

Start the local development server with

  npm run develop

See all commands at

  https://www.gatsbyjs.com/docs/gatsby-cli/

Reproduction Link
https://noneed.dev
Steps to Reproduce

Launch npx gatsby new
Select the same options I choosen (you can find them in the output)

Expected Result
I would expect no error at all.
Actual Result
After installing plugins the CLI reports an error:
ERROR

× Could not find a suitable version of gatsby-cli. Please report this issue at
https://www.github.com/gatsbyjs/gatsby/issues

Environment
System:
    OS: Windows 10 10.0.19043
    CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
  Binaries:
    Node: 16.13.2 - D:\Program Files\nodejs\node.EXE
    npm: 8.1.4 - D:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.9.7
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (97.0.1072.55)
  npmGlobalPackages:
    gatsby-cli: 4.5.1
Config Flags
No response

Duplicate issue #34501: Empty Gatsby Config
Created: 2022-01-15T22:28:45Z
Preliminary Checks

 This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
 This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions

Description
After running gatsby new or npm init gatsby project is created correctly but with an empty config.
module.exports = {
    siteMetadata: {
        siteUrl: `https://www.yourdomain.tld`,
    },
    plugins: [

    ]
}

Reproduction Link
N/A
Steps to Reproduce

gatsby new
npm init gatsby
...

Expected Result
Populated config
Actual Result
Empty config
Environment
Windows 10
Node v14.18.1
gatsby-cli@4.5.1
Config Flags
None

Closing comment (2022-01-17T07:50:20Z): Duplicate of #34477