解决 sharp: Installation error: unable to verify the first certificate

使用 plasmo 时报错如下:

E:\chromeplugins>pnpm create plasmo
../.pnpm-store/v3/tmp/dlx-46852          |   +2 +
../.pnpm-store/v3/tmp/dlx-46852          | Progress: resolved 2, reused 2, downloaded 0, added 2, done
🟣 Plasmo v0.83.0
🔴 The Browser Extension Framework
🟡  Extension name: myExtension3
🟡  Extension description: just for fun
🟡  Author name: mike  gao
🔵 INFO   | Creating new project with popup
🔵 INFO   | Installing dependencies...
 WARN  1 deprecated subdependencies found: stable@0.1.8
Packages: +560
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 634, reused 559, downloaded 0, added 560, done
node_modules/.pnpm/sharp@0.32.5/node_modules/sharp: Running install script, failed in 2.8s
.../sharp@0.32.5/node_modules/sharp install$ (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp …
│ sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.14.4/libvips-8.14.4-win32-x64.tar.br
│ sharp: Installation error: unable to verify the first certificate
│ sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
└─ Failed in 2.8s at E:\chromeplugins\my-extension3\node_modules\.pnpm\sharp@0.32.5\node_modules\sharp
 ELIFECYCLE  Command failed with exit code 1.

重点是这行:sharp: Installation error: unable to verify the first certificate

可知是安装sharp 有问题。

打开提示中的文档:

sharp - High performance Node.js image processing

设置中国镜像,问题解决

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值