gatsbyjs / gatsby

The best React-based framework with performance, scalability and security built in.
https://www.gatsbyjs.com
MIT License
55.3k stars 10.31k forks source link

Error: Command failed with exit code 1: yarnpkg #26804

Closed KtaVC11 closed 4 years ago

KtaVC11 commented 4 years ago

Description

Hello, everytime I try to install a gatsby theme I have this error: Error: Command failed with exit code 1: yarnpkg

I tried this: gatsby new gatsby-graphcms-ecommerce-starter https://github.com/GraphCMS/gatsby-graphcms-ecommerce-starter

Result: image

Environment: Windows 10 node -v v14.9.0

npm -v 6.14.8

yarn --v yarn install v1.22.5

gatsby-cli@2.12.91

pvdz commented 4 years ago

Hi @KtaVC11! This appears to work under linux. I'm going to ask for somebody to verify this on Windows.

vladar commented 4 years ago

I tried to reproduce it but couldn't. My best guess is that it is likely a problem with your node-gyp setup for windows.

  1. Do you use nvm? If so, try yarn cache clean and maybe manually clean dependencies of old yarn installation
  2. Make sure you've followed all the steps from https://www.gatsbyjs.com/docs/gatsby-on-windows/

Also, can you post the full console output, not just the error?

vladar commented 4 years ago

Possibly related: https://github.com/alxshelepenok/gatsby-starter-lumen/issues/691

KtaVC11 commented 4 years ago
  1. yarn cache clea

Sorry yes, I did yarn cache clean and I tried with another theme and here is the complete error:

gatsby new woocommerce-gatsby https://github.com/imranhsayed/gatsby-woocommerce-themes info Creating new site from git: https://github.com/imranhsayed/gatsby-woocommerce-themes.git Cloning into 'woocommerce-gatsby'... remote: Enumerating objects: 302, done. remote: Counting objects: 100% (302/302), done. remote: Compressing objects: 100% (256/256), done. remote: Total 302 (delta 11), reused 201 (delta 6), pack-reused 0 Receiving objects: 100% (302/302), 283.02 MiB | 345.00 KiB/s, done. Resolving deltas: 100% (11/11), done. Updating files: 100% (209/209), done. success Created starter directory layout info Installing packages... yarn install v1.22.5 [1/4] Resolving packages... [2/4] Fetching packages... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... info There appears to be trouble with your network connection. Retrying... error An unexpected error occurred: "https://registry.yarnpkg.com/json2mq/-/json2mq-0.2.0.tgz: connect ENETUNREACH 104.16.19.35:443". info If you think this is a bug, please open a bug report with the information provided in "C:\Users\katav\OneDrive\Desktop\Gatsby Projects\woocommerce-gatsby\yarn-error.log". info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

ERROR

Command failed with exit code 1: yarnpkg

Error: Command failed with exit code 1: yarnpkg

KtaVC11 commented 4 years ago

I tried to reproduce it but couldn't. My best guess is that it is likely a problem with your node-gyp setup for windows.

  1. Do you use nvm? If so, try yarn cache clean and maybe manually clean dependencies of old yarn installation
  2. Make sure you've followed all the steps from https://www.gatsbyjs.com/docs/gatsby-on-windows/

Also, can you post the full console output, not just the error?

I think second item resolved my problem, I will try again with another theme, thanks!!

ascorbic commented 4 years ago

Thanks for the update. I'm going to close this, but please do re-open this or open a new issue if there are still problems.