vbenjs / vite-plugin-imagemin

A vite plugin for compressing image assets.
MIT License
207 stars 28 forks source link

下载报错 #33

Open lxy030988 opened 2 years ago

lxy030988 commented 2 years ago

1.电脑支持翻墙 2.尝试官方提供的几种方案,都不能下载

npm i vite-plugin-imagemin -D npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

gifsicle@5.2.0 postinstall C:\workspace\imp-web\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:\workspace\imp-web\node_modules\bin-build\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)

npm WARN sass-loader@13.0.2 requires a peer of webpack@^5.0.0 but none is installed. You must install peer dependencies yourself. npm WARN imp-web@2.0.0 No repository field. npm WARN imp-web@2.0.0 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-windows-64@0.14.47 (node_modules\esbuild-windows-64): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, unlink 'C:\workspace\imp-web\node_modules.esbuild-windows-64.DELETE\esbuild.exe' npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-android-64@0.14.47 (node_modules\esbuild-android-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-android-64@0.14.47: wanted {"os":"android","arch":"x64"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-freebsd-64@0.14.47 (node_modules\esbuild-freebsd-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-freebsd-64@0.14.47: wanted {"os":"freebsd","arch":"x64"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-darwin-arm64@0.14.47 (node_modules\esbuild-darwin-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-darwin-arm64@0.14.47: wanted {"os":"darwin","arch":"arm64"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-darwin-64@0.14.47 (node_modules\esbuild-darwin-64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-darwin-64@0.14.47: wanted {"os":"darwin","arch":"x64"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-android-arm64@0.14.47 (node_modules\esbuild-android-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-android-arm64@0.14.47: wanted {"os":"android","arch":"arm64"} (current: {"os":"win32","arch":"x64"}) npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-32@0.14.47: wanted {"os":"win32","arch":"ia32"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: esbuild-windows-arm64@0.14.47 (node_modules\esbuild-windows-arm64): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for esbuild-windows-arm64@0.14.47: wanted {"os":"win32","arch":"arm64"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! gifsicle@5.2.0 postinstall: node lib/install.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the gifsicle@5.2.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\Administrator\AppData\Roaming\npm-cache_logs\2022-07-12T07_46_54_271Z-debug.log

xizhutao commented 2 years ago

遇到同样错误,请问有解决办法吗

1999-xinz commented 2 years ago

我也遇到了安装的问题 包管理器是pnpm 使用的是npm源 环境是node v16.15.0 | npm 8.5.5 ,尝试国内镜像同样的错误

image
liuzongyang255 commented 1 year ago

我也遇到了,请问有解决方法吗 image

PS D:\developer\git\cloud\boot-framework-front-projects\cms-sso-front-test> yarn install
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
[4/5] Linking dependencies...
warning "@cqliving/vben-admin > vite-plugin-pwa@0.11.13" has unmet peer dependency "workbox-build@^6.4.0".
warning "@cqliving/vben-admin > vite-plugin-pwa@0.11.13" has unmet peer dependency "workbox-window@^6.4.0".
[5/5] Building fresh packages...
[7/15] ⠂ jpegtran-bin
[9/15] ⠂ optipng-bin
[6/15] ⠄ gifsicle
[8/15] ⠄ mozjpeg
error D:\developer\git\cloud\boot-framework-front-projects\cms-sso-front-test\node_modules\gifsicle: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments: 
Directory: D:\developer\git\cloud\boot-framework-front-projects\cms-sso-front-test\node_modules\gifsicle
Output:
‼ connect ETIMEDOUT 185.199.109.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:\developer\git\cloud\boot-framework-front-projects\cms-sso-front-test\node_modules\bin-build\node_modules\execa\index.js:231:11
CharleeWa commented 1 year ago

项目开的挺及时的,但停止维护更快!vbenjs插件质量都不是很高……

xiangxiangsu commented 1 year ago

this is a problem with internet,in lib/index.js show it needs to visit https://raw.githubusercontent.com/****,u can see clear in this issue with other plugin https://github.com/imagemin/mozjpeg-bin/issues/50

weicheng333 commented 1 year ago

我也遇到了安装的问题 包管理器是pnpm 使用的是npm源 环境是node v16.15.0 | npm 8.5.5 ,尝试国内镜像同样的错误

image

14.20可以,但是呃我们公司要用高版本node