• 解决:PicGo插件安装失败,失败码为1(404)


    一、错误说明

    在安装PicGo插件时,发现插件安装失败,失败的表现是:先显示“安装中”,随后又变为显示“安装”,而不是“已安装”。

    查看PicGo的日志说明,发现报错如下

    image-20220905140750001

    image-20220905140822169

    2022-09-05 13:57:28 [PicGo ERROR] 插件安装失败,失败码为1,错误日志为 
     [37;40mnpm[0m [0m[31;40mERR![0m [0m[35mcode[0m E404
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m Not Found - GET https://cdn.npmmirror.com/binaries/electron/picgo-plugin-gitee-uploader
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m 
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m  'picgo-plugin-gitee-uploader@*' is not in the npm registry.
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m You should bug the author to publish it (or use the name yourself!)
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m 
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m Note that you can also install from a
    [0m[37;40mnpm[0m [0m[31;40mERR![0m [0m[35m404[0m tarball, folder, http url, or git url.
    [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     C:\Users\asus\AppData\Local\npm-cache\_logs\2022-09-05T05_57_28_080Z-debug.log
    [0m 
    2022-09-05 14:02:13 [PicGo INFO] [PicGo Server] is listening at 36677 
    2022-09-05 14:03:59 [PicGo SUCCESS] 插件安装成功 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15

    可以看到其中有一句是Not Found - GET https://cdn.npmmirror.com/binaries/electron/picgo-plugin-gitee-uploader,即没有找到网址。我们可以通过命令行安装的方式来解决

    二、解决方案

    1、路径下打开命令行

    找到自己PicGo的安装路径

    image-20220905141121542

    对我来说,就是跳转到路径D:\SoftWare\Typora\PicGo,在这个路径下打开命令行

    2、安装插件

    例如我想安装的插件是 gitee-uploader 1.1.2,则运行命令npm install picgo-plugin-插件名

    npm install picgo-plugin-gitee-uploader
    
    • 1

    image-20220905141501761

    安装完成后重启PicGo,观察插件设置里有没有出现对应插件,如果出现,就已经完成了。

    如果没出现,则进行下一个步骤

    3、导入插件(可选)

    在上步插件安装完成后,目录(D:\SoftWare\Typora\PicGo)下会出现一个文件夹node_modules,点开发现里面有了刚安装的插件

    image-20220905141832996

    在PicGo中右上角按钮导入插件

    image-20220905141858418

    选中这个文件夹picgo-plugin-gitee-uploader,导入即可

  • 相关阅读:
    安卓面试突破专题课程
    UDP协议
    你真的了解CPU和GPU?
    【笔记】逻辑斯蒂回归
    三个多月,被现实雪藏了的锐气
    在 Python 中将 Unicode 转换为 ASCII
    网安面经之文件上传漏洞
    【第三章-1】面向对象——类与对象基本概念
    【C++】模板基础 + STL
    AI秘籍:助您提升办公和学习效率
  • 原文地址:https://blog.csdn.net/Netceor/article/details/126704416