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

windowspnpm很多都不能build...比如gifsicle #23

Closed
billmi opened this issue Aug 26, 2024 · 3 comments
Closed

windowspnpm很多都不能build...比如gifsicle #23

billmi opened this issue Aug 26, 2024 · 3 comments

Comments

@billmi
Copy link

billmi commented Aug 26, 2024

.../gifsicle@5.2.0/node_modules/gifsicle postinstall$ 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 D:\phpstudy_pro\WWW\uni\uniapp-vue3-template\node_modules.pnpm\execa@0.7.0\node_modules\execa\index.js:231:11
│ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
│ at async Promise.all (index 0)

│ getaddrinfo ENOENT raw.githubusercontent.com
│ compiling from source
│ pngquant pre-build test failed
│ Error: pngquant failed to build, make sure that libpng-dev is installed
│ at D:\phpstudy_pro\WWW\uni\uniapp-vue3-template\node_modules.pnpm\execa@0.7.0\node_modules\execa\index.js:231:11
│ at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
│ at async Promise.all (index 0)

@oyjt
Copy link
Owner

oyjt commented Aug 27, 2024

vite-plugin-imagemin这个图片压缩插件导致的,如果不用这个插件可以删除后再安装。

这里贴一下vite-plugin-imagemin相关说明

由于 imagemin 在中国不好安装。现提供几个解决方案

使用 yarnpackage.json 内配置(推荐)

"resolutions": {
"bin-wrapper": "npm:bin-wrapper-china"
},

使用 npm,在电脑 host 文件加上如下配置即可

199.232.4.133 raw.githubusercontent.com

使用 cnpm 安装(不推荐)

@oyjt oyjt closed this as completed Aug 30, 2024
@oyjt oyjt pinned this issue Nov 27, 2024
@yuanzougaofei97
Copy link

在电脑 host 也不行,几种方法都不行。我觉得就不应该用这个插件,我看几年都没维护了。

@Appidd
Copy link

Appidd commented Dec 19, 2024

pnpm install --ignore-scripts可以解决

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

6 participants
@oyjt @billmi @yuanzougaofei97 @Appidd and others