Docusaurus: 'autoreconf' is not recognized as an internal or external command

Created on 1 Oct 2019  ·  12Comments  ·  Source: facebook/docusaurus

Installation fails due to gifsicle requiring autoreconf not available on Windows.

Have you read the Contributing Guidelines on issues?

Yes.

To Reproduce

npm install docusaurus

Expected behavior

Installation succesful.

Actual Behavior

...
> [email protected] postinstall C:\temp\docusaurus\node_modules\gifsicle
> node lib/install.js

  ‼ self signed certificate in certificate chain
  ‼ gifsicle pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -ivf"
'autoreconf' is not recognized as an internal or external command,
operable program or batch file.
...
platform-inconsistency

Most helpful comment

In my case, 3 steps solved this problem.

  • set http_proxy=http://127.0.0.1:1080
    set https_proxy=http://127.0.0.1:1080
  • add 199.232.4.133 raw.githubusercontent.com to hosts files.
  • cmd.exe ipconfig/flushdns

All 12 comments

I couldn't reproduce. From the log, its most likely environment problem, we can't do anything from our side to fix it.

You should open an issue with gifsicle if you think they are doing something incorrectly.

What is your environment ? try npx envinfo and copy the result.

This seems to be related to #1758. I'm behind a corporate proxy, which seems block a process in the postinstallation script of gifsicle in which something is downloaded from GitHub. As a fallback gifsicle then compiles from source instead, throwing an error because it uses an executable that not exists on Windows.

I realize it's not for docusaurus to fix, but maybe it could be an idea to review if this dependency is actually needed? Because as of now docusaurus can't be installed by users behind corporate proxys, at least not by me.

References:

You might consider a fork to remove imagemin. We definitely need it to optimize the image. Removing it would mean breaking changes.

Ok, I understand. I close the ticket then. Thanks.

gifsicle pre-build test failed

[4/4] Building fresh packages...
[-/6] ⠠ waiting...                                                                                                                                                      [6/6] ⠠ optipng-bin                                                                                                                                                     [-/6] ⠐ waiting...                                                                                                                                                      [4/6] ⠐ gifsicle                                                                                                                                                        error D:\ctms\node_modules\gifsicle: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: D:\ctms\node_modules\gifsicle
Output:
‼ read ECONNRESET
  ‼ gifsicle pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -ivf"
'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij���
�����������

gifsicle

I have the same problem. How can you solve it?

In my case, 3 steps solved this problem.

  • set http_proxy=http://127.0.0.1:1080
    set https_proxy=http://127.0.0.1:1080
  • add 199.232.4.133 raw.githubusercontent.com to hosts files.
  • cmd.exe ipconfig/flushdns

In my case, 3 steps solved this problem.

  • set http_proxy=http://127.0.0.1:1080
    set https_proxy=http://127.0.0.1:1080
  • add 199.232.4.133 raw.githubusercontent.com to hosts files.
  • cmd.exe ipconfig/flushdns

Can you tell me the specific commands to be executed in each step?thank you very much

You can try to use cnpm of Taobao mirror:
1、npm install -g cnpm --registry=https://registry.npm.taobao.org
2、cnpm i -g gifsicle

In my case, 3 steps solved this problem.

  • set http_proxy=http://127.0.0.1:1080
    set https_proxy=http://127.0.0.1:1080
  • add 199.232.4.133 raw.githubusercontent.com to hosts files.
  • cmd.exe ipconfig/flushdns

Can you tell me the specific commands to be executed in each step?thank you very much

  • First step use command.exe

install automake for windows resolve this problem for me
http://gnuwin32.sourceforge.net/packages/automake.htm

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JoelMarcey picture JoelMarcey  ·  3Comments

lex111 picture lex111  ·  3Comments

rickyvetter picture rickyvetter  ·  3Comments

MoogyG picture MoogyG  ·  3Comments

omry picture omry  ·  3Comments