系统相关
首页 > 系统相关> > 【bug】【npm】Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c “./configure --disable-shared

【bug】【npm】Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c “./configure --disable-shared

作者:互联网

问题描述

> cwebp-bin@5.1.0 postinstall D:\working\项目-报奖平台\myvue\node_modules\cwebp-bin
> node lib/install.js

  ‼ read ECONNRESET
  ‼ cwebp pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "./configure --disable-shared --prefix="D:\working\项目-报奖平台\myvue\node_modules\cwebp-bin\vendor" --bindir="D:\working\项目-报奖平台\myvue\node_modules\cwebp-bin\vendor""
'.' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���


    at D:\working\项目-报奖平台\myvue\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Promise.all (index 0)

> gifsicle@4.0.1 postinstall D:\working\项目-报奖平台\myvue\node_modules\gifsicle
> node lib/install.js

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


    at D:\working\项目-报奖平台\myvue\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Promise.all (index 0)

> mozjpeg@6.0.1 postinstall D:\working\项目-报奖平台\myvue\node_modules\mozjpeg
> node lib/install.js

  ‼ getaddrinfo ENOENT raw.githubusercontent.com
  ‼ mozjpeg pre-build test failed
  i compiling from source
  × RequestError: connect ETIMEDOUT 52.74.223.119:443
    at ClientRequest.<anonymous> (D:\working\项目-报奖平台\myvue\node_modules\got\index.js:111:21)
    at Object.onceWrapper (events.js:483:26)
    at ClientRequest.emit (events.js:376:20)
    at TLSSocket.socketErrorListener (_http_client.js:475:9)
    at TLSSocket.emit (events.js:376:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

> optipng-bin@6.0.0 postinstall D:\working\项目-报奖平台\myvue\node_modules\optipng-bin
> node lib/install.js

  ‼ getaddrinfo ENOENT raw.githubusercontent.com
  ‼ optipng pre-build test failed
  i compiling from source
  × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "./configure --with-system-zlib --prefix="D:\working\项目-报奖平台\myvue\node_modules\optipng-bin\vendor" --bindir="D:\working\项目-报奖平台\myvue\node_modules\optipng-bin\vendor""
'.' �����ڲ����ⲿ���Ҳ���ǿ����еij���
���������ļ���


    at D:\working\项目-报奖平台\myvue\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Promise.all (index 0)

> pngquant-bin@5.0.2 postinstall D:\working\项目-报奖平台\myvue\node_modules\pngquant-bin
> node lib/install.js

  ‼ getaddrinfo ENOENT raw.githubusercontent.com
  ‼ pngquant pre-build test failed
  i compiling from source
  × Error: pngquant failed to build, make sure that libpng-dev is installed
    at D:\working\项目-报奖平台\myvue\node_modules\execa\index.js:231:11
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Promise.all (index 0

问题原因

这是node-sass安装时出错,GitHub的raw.githubusercontent.com无法

问题解决

  1. http://tool.chinaz.com/dns ,查询 raw.githubusercontent.com 这个所对应的IP
  2. hosts文件增加
185.199.110.133  raw.githubusercontent.com

标签:npm,node,exe,working,modules,js,myvue,shared,报奖
来源: https://blog.csdn.net/lorogy/article/details/116997315