Closed jimmy2011617 closed 3 years ago
发布了1.3.5版本,npm 安装会使用 taobao 镜像。
如果有代理的话,一定要设置代理,代理主要是为了解决,gifsicle
或者其它需要额外到 githubcontent.com 下载二进制程序的问题,如果没配置代理,可能会下载失败。
npm config set proxy http://127.0.0.1:1080
npm config set https-proxy http://127.0.0.1:1080
// http://127.0.0.1:1080 设置成你的http代理端口
如果你有装yarn的话,自己到插件底下
yarn
会比npm安装要顺利很多
后续可能会把这些需要额外安装程序的依赖,抽离出去,只有选中的时候才会懒加载,否则太影响插件第一次安装了...
代理直接使用外部开全局是否也可以
不可以,必须要配置。
jimmy2011617 notifications@github.com于2020年12月18日 周五12:33写道:
代理直接使用外部开全局是否也可以
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/JuZiSang/picgo-plugin-compress/issues/21#issuecomment-747861527, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSHTC4VZJ5J32EPGZ2ZAQDSVLLSXANCNFSM4U7X7XRA .
请问额外安装程序的依赖抽离出去是不是会在下一个版本1.3.6进行,大概需要多久
npm config set proxy http://127.0.0.1:1080 npm config set https-proxy http://127.0.0.1:1080 已经设置 还是处于安装中
1080是http的代理端口?npm不支持 socks5 的代理。
还有把 picgo 的日志贴出来。
2020-12-18 12:28:27 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为[37;40mnpm[0m [0m[30;43mWARN[0m [0m[35mdeprecated[0m har-validator@5.1.5: this library is no longer supported [0m
images@3.2.3 install /Users/andy/Library/Application Support/picgo/node_modules/images node scripts/nothing.js
gifsicle@5.1.0 postinstall /Users/andy/Library/Application Support/picgo/node_modules/gifsicle node lib/install.js
⚠ connect ECONNREFUSED 0.0.0.0:443 ⚠ gifsicle pre-build test failed ℹ compiling from source ✖ Error: Command failed: /bin/sh -c autoreconf -ivf autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autom4te: need GNU m4 1.4 or later: /usr/bin/m4 aclocal: error: echo failed with exit status: 1 autoreconf: aclocal failed with exit status: 1
at Promise.all.then.arr (/Users/andy/Library/Application Support/picgo/node_modules/bin-build/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[37;40mnpm[0m [0m[30;43mWARN[0m[35m[0m @octokit/plugin-request-log@1.0.2 requires a peer of @octokit/core@>=3 but none was installed.
[0m
[37;40mnpm[0m [0m[31;40mERR![0m [0m[35mcode[0m ELIFECYCLE
[0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35merrno[0m 1
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m gifsicle@5.1.0 postinstall: node lib/install.js
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m Exit status 1
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m Failed at the gifsicle@5.1.0 postinstall script.
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m This is probably not a problem with npm. There is likely additional logging output above.
[0m
[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m A complete log of this run can be found in:
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m /Users/andy/.npm/_logs/2020-12-18T04_28_27_430Z-debug.log
[0m
2020-12-18 12:43:38 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为[37;40mnpm[0m [0m[30;43mWARN[0m [0m[35mdeprecated[0m har-validator@5.1.5: this library is no longer supported
[0m
images@3.2.3 install /Users/andy/Library/Application Support/picgo/node_modules/images node scripts/nothing.js
gifsicle@5.1.0 postinstall /Users/andy/Library/Application Support/picgo/node_modules/gifsicle node lib/install.js
⚠ connect ECONNREFUSED 0.0.0.0:443 ⚠ gifsicle pre-build test failed ℹ compiling from source ✖ Error: Command failed: /bin/sh -c autoreconf -ivf autoreconf: Entering directory `.' autoreconf: configure.ac: not using Gettext autoreconf: running: aclocal --force autom4te: need GNU m4 1.4 or later: /usr/bin/m4 aclocal: error: echo failed with exit status: 1 autoreconf: aclocal failed with exit status: 1
at Promise.all.then.arr (/Users/andy/Library/Application Support/picgo/node_modules/bin-build/node_modules/execa/index.js:231:11)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
[37;40mnpm[0m [0m[30;43mWARN[0m[35m[0m @octokit/plugin-request-log@1.0.2 requires a peer of @octokit/core@>=3 but none was installed.
[0m
[37;40mnpm[0m [0m[31;40mERR![0m [0m[35mcode[0m ELIFECYCLE
[0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35merrno[0m 1
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m gifsicle@5.1.0 postinstall: node lib/install.js
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m Exit status 1
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m Failed at the gifsicle@5.1.0 postinstall script.
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m This is probably not a problem with npm. There is likely additional logging output above.
[0m
[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m A complete log of this run can be found in:
[0m[37;40mnpm[0m [0m[31;40mERR![0m[35m[0m /Users/andy/.npm/_logs/2020-12-18T04_43_38_408Z-debug.log
[0m
2020-12-18 13:06:11 [PicGo INFO] [PicGo Server] shutdown
2020-12-18 13:06:14 [PicGo INFO] [PicGo Server] is listening at 36677
2020-12-18 13:28:40 [PicGo INFO] [PicGo Server] shutdown
2020-12-18 13:28:42 [PicGo INFO] [PicGo Server] is listening at 36677
检查代理端口是否是http,身边现在没mac,没办法验证。不行请自行npm安装 https://github.com/JuZiSang/picgo-plugin-compress/issues/2
PS C:\Users\Administrator\AppData\Roaming\PicGo> yarn add picgo-plugin-compress --save
yarn add v1.19.1
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
warning picgo-plugin-compress > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning picgo-plugin-compress > request > har-validator@5.1.5: this
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[1/4] ⠈ gifsicle
[2/4] ⠈ jpegtran-bin
[3/4] ⠈ mozjpeg
error C:\Users\Administrator\AppData\Roaming\PicGo\node_modules\gifsicle: Command failed.
Exit code: 1
Command: node lib/install.js
Arguments:
Directory: C:\Users\Administrator\AppData\Roaming\PicGo\node_modules\gifsicle
Output:
‼ 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\Administrator\AppData\Roaming\PicGo\node_modules\execa\index.js:231:11
@gogobody 设置代理,用npm设置就行,注意端口一定要用http的。开全局代理
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
cnpm install picgo-plugin-compress --save 成功
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
cnpm install picgo-plugin-compress --save 成功
好的,兄弟谢谢你哦!!!
之前我尝试了 ① gitbash/cmd 的终端切换 ② nvm use <版本>,的 14、12、10 的node版本切换 ③ 用【全局代理】 或者 【taobao镜像】,两种方式的切换 ④ npm 和 yarn ,两种依赖管理工具的切换 ⑤ 缓存清理, node_modules 和 npm cache clean
以上多种方法,都没有解决问题。
使用你的方法后,问题得到了解决!!!!!!
Gui安装显示一直处于安装中,有时能安装上但重启之后又消失,或者在启用后报异常,其他插件没有类似故障,请问如何解决