gatsbyjs / gatsby

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

npm install failed with error "autoreconf -fiv" #27395

Closed walxlgf closed 4 years ago

walxlgf commented 4 years ago

Description

npm install failed with error "autoreconf -fiv"

Steps to reproduce

npm install

Expected result

install successful.

Actual result

× Error: Command failed: C:\Windows\system32\cmd.exe /s /c "autoreconf -fiv" 'autoreconf' is not recognized as an internal or external command, operable program or batch file.

Environment

System: OS: Windows 10 10.0.18362 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Binaries: Node: 10.16.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.13.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.14 Browsers: Chrome: 85.0.4183.121 Edge: Spartan (44.18362.449.0) npmPackages: gatsby: ^2.24.63 => 2.24.73 gatsby-image: ^2.4.19 => 2.4.21 gatsby-plugin-netlify: ^2.3.15 => 2.3.17 gatsby-source-filesystem: ^2.3.30 => 2.3.34 gatsby-source-graphql: ^2.7.4 => 2.7.6 gatsby-transformer-sharp: ^2.5.15 => 2.5.17 npmGlobalPackages: gatsby-cli: 2.12.100

LekoArts commented 4 years ago

Hi!

Sorry to hear you're running into an issue. To help us best begin debugging the underlying cause, it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.

If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.

Thanks for using Gatsby! 💜

ascorbic commented 4 years ago

Hi. I'm going to close this now, as we can't do much to help without a reproduction. If you are able to create a minimal reproduction for this then please do reopen the issue. Thanks!

bilalbutt044 commented 3 years ago

@LekoArts @ascorbic i am getting same issue while installing starter locally gatsby new my-gatsby-project https://github.com/gatsbyjs/gatsby-starter-default

gatsby-cli version = 2.12.115y node version = v12.16.1

Errors

 ‼ getaddrinfo EAI_AGAIN raw.githubusercontent.com
  ‼ mozjpeg pre-build test failed
  i compiling from source
  × Error: Command failed: C:\Windows\system32\cmd.exe /s /c "autoreconf -fiv"
'autoreconf' is not recognized as an internal or external command,
operable program or batch file.

    at C:\Users\Bilal\Desktop\gatsby\gatsby-with-wordpress\node_modules\bin-build\node_modules\execa\index.js:231:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Promise.all (index 0)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mozjpeg@7.0.0 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mozjpeg@7.0.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Bilal\AppData\Roaming\npm-cache\_logs\2020-11-03T10_55_25_617Z-debug.log
error Command failed with exit code 1: npm install

  Error: Command failed with exit code 1: npm install

  - error.js:56 makeError
    [npm]/[gatsby-cli]/[execa]/lib/error.js:56:11

  - index.js:114 handlePromise
    [npm]/[gatsby-cli]/[execa]/index.js:114:26

  - task_queues.js:97 processTicksAndRejections
    internal/process/task_queues.js:97:5

  - init-starter.js:142 install
    [npm]/[gatsby-cli]/lib/init-starter.js:142:7

  - init-starter.js:209 clone
    [npm]/[gatsby-cli]/lib/init-starter.js:209:3

  - init-starter.js:350 initStarter
    [npm]/[gatsby-cli]/lib/init-starter.js:350:5

  - create-cli.js:443
    [npm]/[gatsby-cli]/lib/create-cli.js:443:7
intellijboy commented 3 years ago

@bilalbutt044 i am getting same issue 😢

bilalbutt044 commented 3 years ago

@kakaluote444 update gatsby cli and then try to install it. Try to install it in other directory. If still mot work then restart system and then try again

intellijboy commented 3 years ago

@bilalbutt044 😄 thank you so much, Now That I'm off work, I'll try it tomorrow

brandiqa commented 3 years ago

OS: Windows 10 Home, Build 21H1, 19043.1165 Node: v14.16.1 npm: v6.14.12

Came across this error when creating a new project initiated with the command npm init gatsby. Below are my final settings:

 Create a new Gatsby site in the folder my-gatsby
    Install gatsby-plugin-gatsby-cloud, gatsby-plugin-image, gatsby-plugin-google-analytics, gatsby-plugin-react-helmet, gatsby-plugin-sitemap, gatsby-plugin-ma
nifest, gatsby-plugin-mdx

I managed to resolve the issue by using yarn