V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
chenqh
V2EX  ›  Visual Studio Code

vsce package 会卡住怎么办?

  •  
  •   chenqh · 138 天前 · 1069 次点击
    这是一个创建于 138 天前的主题,其中的信息可能已经有所发展或是发生改变。
    webpack 5.89.0 compiled successfully in 5082 ms
     DONE  Packaged: /home/vagrant/vcode/xxx-file-split/xxx-file-split-0.0.1.vsix (9 files, 4.72KB)
    

    都运行完命令了,但是现在就是卡住了,怎么办? 有什么办法可以解决吗?

    19 条回复    2023-12-11 18:29:52 +08:00
    jazzg62
        1
    jazzg62  
       138 天前
    这个情况重试也会出现吗?可能是网络有问题,可以试试在后台手动上传
    NessajCN
        2
    NessajCN  
       138 天前
    完成了就行了呀,直接 vsce publish 呗
    chenqh
        3
    chenqh  
    OP
       138 天前
    @jazzg62 我是本地打包啊, 不是上传啊
    chenqh
        4
    chenqh  
    OP
       138 天前
    @NessajCN 然后终端卡住了,我下面的 `code --install-extension ./*.vsix` 就执行不了,导致我脚本运行不了
    NessajCN
        5
    NessajCN  
       138 天前
    @chenqh npm run compile 会卡吗
    jazzg62
        6
    jazzg62  
       138 天前
    @chenqh 抱歉,看错了
    chenqh
        7
    chenqh  
    OP
       138 天前
    @NessajCN 不卡,很快就结束了,奇怪了
    NessajCN
        8
    NessajCN  
       138 天前
    @chenqh 那如果 npx @vscode/vsce package 会卡吗
    chenqh
        9
    chenqh  
    OP
       138 天前
    @NessajCN 我没有 npx 只有 npm
    chenqh
        10
    chenqh  
    OP
       138 天前
    @NessajCN 会卡,没有报不存在的错,就是卡在那里了
    NessajCN
        11
    NessajCN  
       138 天前
    @chenqh npx 是跟着 npm 一起装的
    chenqh
        12
    chenqh  
    OP
       138 天前
    @NessajCN

    现在出结果了

    ```

    npm ERR! code ETIMEDOUT
    npm ERR! syscall connect
    npm ERR! errno ETIMEDOUT
    npm ERR! network request to https://registry.npmjs.org/@vscode%2fvsce failed, reason: connect ETIMEDOUT 104.16.2.35:443
    npm ERR! network This is a problem related to network connectivity.
    npm ERR! network In most cases you are behind a proxy or have bad network settings.
    npm ERR! network
    npm ERR! network If you are behind a proxy, please make sure that the
    npm ERR! network 'proxy' config is set properly. See: 'npm help config'

    npm ERR! A complete log of this run can be found in:
    npm ERR! /home/vagrant/.npm/_logs/2023-12-11T09_48_05_225Z-debug.log
    ```

    为什么 package 也要连 npmjs?
    NessajCN
        13
    NessajCN  
       138 天前   ❤️ 1
    @chenqh npx 的作用是从远程仓库里下载 vsce 来执行,主要是我想看一下是不是你本机的 vsce 损坏
    现在新的这个报错是 npx 没有正确下载到 @vscode/vsce ,你没连网?
    chenqh
        14
    chenqh  
    OP
       138 天前
    @NessajCN 我 vagrant 里面的 vbox 用不了外面的 clash 网就是卡
    chenqh
        15
    chenqh  
    OP
       138 天前
    @NessajCN 好像确实是 @vscode/vsce 的问题,我卸载重装试一下
    chenqh
        16
    chenqh  
    OP
       138 天前
    @NessajCN 脑子晕了,没想到过这个问题
    chenqh
        17
    chenqh  
    OP
       138 天前
    @NessajCN 重装之后现在又卡起来了,郁闷啊
    NessajCN
        18
    NessajCN  
       138 天前 via Android
    @chenqh 你可以在工作目录里 npm i @vscode/vsce
    然后 npx vsce package
    chenqh
        19
    chenqh  
    OP
       138 天前
    @NessajCN 我试试
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2344 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 16:10 · PVG 00:10 · LAX 09:10 · JFK 12:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.