• 【nodejs打包软件PKG】pkg报错Error! ESOCKETTIMEDOUT 和 Asset not found by direct link


    C:UsersAdministratorDesktopvivo X6S A 20200407210303.vbak>pkg savebianqian.js  
    > pkg@4.4.6
    > Targets not specified. Assuming:
      node12-linux-x64, node12-macos-x64, node12-win-x64
    > Fetching base Node.js binaries to PKG_CACHE_PATH
      fetched-v12.16.1-linux-x64   [                    ] 0%
    > Error! read ECONNRESET
    > Asset not found by direct link:
      {"tag":"v2.6","name":"uploaded-v2.6-node-v12.16.1-linux-x64"}
      fetched-v12.16.1-linux-x64   [                    ] 0%
    > Error! ESOCKETTIMEDOUT
    
    C:UsersAdministratorDesktopvivo X6S A 20200407210303.vbak>pkg -t win savebianqian.js  
    > pkg@4.4.6
    > Fetching base Node.js binaries to PKG_CACHE_PATH
      fetched-v12.16.1-win-x64     [                    ] 0%
    > Error! ESOCKETTIMEDOUT
    > Asset not found by direct link:
      {"tag":"v2.6","name":"uploaded-v2.6-node-v12.16.1-win-x64"}
      fetched-v12.16.1-win-x64     [                    ] 0%
    > Error! ESOCKETTIMEDOUT
    

    pkg打包一个JavaScript文件时出现错误,正在排查


    https://www.jianshu.com/p/e0e6d42cb978

    看了别人的文章,我得自己爬梯子去找文件了,终于,谷歌浏览器ctrl+F搜索了一下“uploaded-v2.6-node-v12.16.1-win-x64”找到了,开始下载

    此处版本号就是对应要下载的,我这里是2.6,所以上github找2.6版本的release。

    根据错误提示我需要下载fetched-v12.16.1-win-x64,下载完“uploaded-v2.6-node-v12.16.1-win-x64”后放在C:UsersAdministrator.pkg-cachev2.6上面那个用户目录下,并把名字改为fetched-v12.16.1-win-x64。

    然后我去我的文件夹C:UsersAdministrator.pkg-cachev2.6里看,发现两个downloading,下载卡死在半中间的文件

    我想就是他们两个了,于是把已经下载好的fetched-v12.16.1-win-x64(原名为uploaded-v2.6-node-v12.16.1-win-x64)

    然后那两个没用的downloading就可以删掉了。

    然后继续打包我的js文件pkg -t win savebianqian.js

    成功

  • 相关阅读:
    windows update error 0x8024401c
    linux杀毒软件ClamAV的安装使用
    firewalld防火墙设置
    RPM-GPG-KEY详解
    centos修改默认启动级别
    debian9.6修改系统语言
    ubuntu18.04修改网卡名称为eth0
    Windows server 1709(不含UI)模板部署
    NVIDIA-SMI系列命令总结
    bash: lspci: command not found解决方法
  • 原文地址:https://www.cnblogs.com/guoxinyu/p/12657395.html
Copyright © 2020-2023  润新知