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

vscode 插件 npm install 出现了问题

  •  
  •   chenqh · 2021-04-22 11:15:51 +08:00 · 3942 次点击
    这是一个创建于 1090 天前的主题,其中的信息可能已经有所发展或是发生改变。
    [vagrant@localhost python-import-helper]$ npm install
    
    > [email protected] postinstall /home/vagrant/vcode/python-import-helper
    > node ./node_modules/vscode/bin/install
    
    Detected VS Code engine version: ^1.34.0
    Error installing vscode.d.ts: Error: Request returned status code: 404
    Details: <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>Error</title>
    </head>
    <body>
    <pre>Cannot GET /api/releases/stable</pre>
    </body>
    </html>
    
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! [email protected] postinstall: `node ./node_modules/vscode/bin/install`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the [email protected] postinstall script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/vagrant/.npm/_logs/2021-04-22T03_15_00_071Z-debug.log
    

    这是 npm 的问题,还是 vscode 的问题呀?

    换了一台电脑就这个样子了。

    11 条回复    2021-04-23 12:33:31 +08:00
    pkoukk
        1
    pkoukk  
       2021-04-22 11:39:01 +08:00
    Error installing vscode.d.ts: Error: Request returned status code: 404
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    jones2000
        2
    jones2000  
       2021-04-22 13:46:40 +08:00
    看着像网不行, 上梯子试试。
    chenqh
        3
    chenqh  
    OP
       2021-04-22 13:46:48 +08:00
    @pkoukk 但是我用 npm install axios 没有问题呀

    ```
    [vagrant@localhost python-import-helper]$ npm install axios
    npm WARN [email protected] No description
    npm WARN [email protected] No license field.

    + [email protected]
    added 2 packages from 4 contributors and audited 200 packages in 4.952s
    found 10 vulnerabilities (6 low, 4 high)
    run `npm audit fix` to fix them, or `npm audit` for details
    ```
    chenqh
        4
    chenqh  
    OP
       2021-04-22 13:47:11 +08:00
    @jones2000 我上了梯子了
    Vegetable
        5
    Vegetable  
       2021-04-22 13:52:26 +08:00
    你这个 vscode 太老了,现在 stable 都 1.55 了,可能是这个有问题。我之前遇到过插件死活不好使其实是因为 vscode 版本太低的问题。
    chenqh
        6
    chenqh  
    OP
       2021-04-22 13:54:33 +08:00
    @Vegetable 是的呀,但是怎么修呢 类似的 issue 在这里,https://github.com/microsoft/vscode/issues/120064

    但是怎么 update 我不会呀, 他也没有说
    chenqh
        7
    chenqh  
    OP
       2021-04-22 13:55:52 +08:00
    @Vegetable 我插件只是当初随便写写的呀,有没有迁移的文档?
    chenqh
        8
    chenqh  
    OP
       2021-04-22 14:12:49 +08:00
    @Vegetable 不会迁移,感觉我插件要重写了,..
    7075
        9
    7075  
       2021-04-22 15:19:46 +08:00
    重新下个最新的 vscode 呗
    chenqh
        10
    chenqh  
    OP
       2021-04-22 17:00:01 +08:00
    @7075 我就是最新的 vscode 呀, 1.55.x
    wednesdayco
        11
    wednesdayco  
       2021-04-23 12:33:31 +08:00
    你这里面是不是有指定地址的 npm 包 0 0
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5656 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 06:02 · PVG 14:02 · LAX 23:02 · JFK 02:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.