Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't install? #101

Closed
forliuyifei opened this issue Jul 12, 2020 · 5 comments
Closed

Can't install? #101

forliuyifei opened this issue Jul 12, 2020 · 5 comments

Comments

@forliuyifei
Copy link

$ npm install hexo-all-minifier --save

> gifsicle@4.0.1 postinstall C:\Users\Xin\Desktop\hexo\loafing\node_modules\gifsicle
> node lib/install.js

  ‼ getaddrinfo ENOENT raw.githubusercontent.com
  ‼ gifsicle pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -ivf"
'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���


    at C:\Users\Xin\Desktop\hexo\loafing\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\hexo-blog-encrypt\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@1.2.13 (node_modules\hexo-admin\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\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! gifsicle@4.0.1 postinstall: `node lib/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the gifsicle@4.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@KumaNNN
Copy link

KumaNNN commented Jul 22, 2020

npm install hexo-all-minifier --save --ignore-scripts

@nathaniel2020
Copy link

nathaniel2020 commented Jul 24, 2020

npm install hexo-all-minifier --save --ignore-scripts

i use this, and it install correctly, but i can't use hexo g, the erros as follows

Error: write EOF at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:92:16)

when i uninstall the hexo-all-minifier, hexo g can work

@DefectingCat
Copy link

DefectingCat commented Aug 4, 2020

npm install hexo-all-minifier --save --ignore-scripts

that can not slove the problem , just ignore the scripts, actually it's can not work with hexo g.

the error log is : Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -ivf"
in a long time , i thought that it's my windows can't run autoconf, though i installed cygwin.
but actually that is "network problem".

the truly problem is can not connect with raw.githubusercontent.com.

So, try write it in your hosts:

52.74.223.119     github.com
192.30.253.119    gist.github.com
54.169.195.247    api.github.com
185.199.111.153   assets-cdn.github.com
151.101.76.133    raw.githubusercontent.com
151.101.76.133    gist.githubusercontent.com
151.101.76.133    cloud.githubusercontent.com
151.101.76.133    camo.githubusercontent.com
151.101.76.133    avatars0.githubusercontent.com
151.101.76.133    avatars1.githubusercontent.com
151.101.76.133    avatars2.githubusercontent.com
151.101.76.133    avatars3.githubusercontent.com
151.101.76.133    avatars4.githubusercontent.com
151.101.76.133    avatars5.githubusercontent.com
151.101.76.133    avatars6.githubusercontent.com
151.101.76.133    avatars7.githubusercontent.com
151.101.76.133    avatars8.githubusercontent.com

then try ping raw.githubusercontent.com.

批注 2020-08-04 135351

if it's worked , then try hexo-all-minifier again:

# in your blog
rm -rf node_modules/
# or npm install
npm install hexo-all-minifier --save

批注 2020-08-04 135700

enjoy.

How to edit hosts
Same error

@chenzhutian chenzhutian pinned this issue Oct 8, 2020
@WL2O2O
Copy link

WL2O2O commented Aug 19, 2023

衷心建议:
安装失败的老铁们,别管各种不一样的报错,我的各种报错都没有在上面提到的issues中找到,仔细看报错内容提示,该重启的时候就重启,该上梯子就上梯子(不行就全局模式),卸载依赖:npm uninstall hexo-all-minifier;安装依赖:npm install hexo-all-minifier --save,这两个命令反复多来几次,就会忽然发现,安装成功了!!!!最后吐槽一句,被墙真不友好!!!
English version:
Sincere suggestions:
The old iron workers who failed to install, regardless of the different error reports, my various errors were not found in the issues mentioned above. Carefully read the error report content prompt, restart when it is time to restart, go up the ladder when it is time to restart (global mode if not possible), uninstall dependency: 'npm uninstall hexo all minifier'; Installation dependency: 'npm install hexo all minifier -- save'. Repeat these two commands several times and suddenly realize that the installation was successful!!!! In the end, roast that it was really unfriendly to be on the wall!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@chenzhutian @nathaniel2020 @DefectingCat @KumaNNN @forliuyifei @WL2O2O and others