gatsbyjs/gatsby
View on GitHubNew gatsby-cli installation on ubuntu (wsl2) shows errors when running the command `gatsby` in terminal
Open
#34088 opened on Nov 28, 2021
good first issuestatus: confirmedtopic: clitype: bug
Description
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
I just recently installed gatsby-cli on ubuntu 20 and every time I run the command gatsby on the command line it shows error on multiple areas. I run the same command gatsby --verbose as advised by gatsby message but it produces the exact same error. Here is a screenshot:

this also prevents me from setting up projects using gatsby templates. the command throws an error when running gatsby install with a template url.
Reproduction Link
https://gatsby.dev/reproduction
Steps to Reproduce
- npm i -g gastby-cli
- gatsby
- gatsby --verbose
Expected Result
create a new gatsby project without errors.
Actual Result

Environment
System:
OS: Linux 5.10 Ubuntu 20.04.3 LTS (Focal Fossa)
CPU: (16) x64 AMD Ryzen 9 5900HX with Radeon Graphics
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v16.13.0/bin/yarn
npm: 8.1.4 - ~/.nvm/versions/node/v16.13.0/bin/npm
npmGlobalPackages:
gatsby-cli: 4.2.0
Config Flags
No response