首页 > 解决方案 > vscode.d.ts 无法安装

问题描述

当我尝试运行 vscode-install 时,它将无法同步 vscode.d.ts。这个问题似乎是随机的,我们的大多数机器都无法成功,但我们的两台机器可以成功。
错误信息如下:

Detected VS Code engine version: ^1.23.0
Error installing vscode.d.ts: Error: read ECONNRESET
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lispvsext@0.0.1 postinstall: `vscode-install && node ./node_modules/vscode/bin/install`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lispvsext@0.0.1 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!     C:\Users\*\AppData\Roaming\npm-cache\_logs\2019-02-15T09_28_45_624Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! lispvsext@1.0.8 postinstall: `cd extension && npm install && cd ..`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the lispvsext@1.0.8 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!     C:\Users\*\AppData\Roaming\npm-cache\_logs\2019-02-15T09_28_45_805Z-debug.log

标签: visual-studio-codevscode-extensions

解决方案


我有一个类似的问题,package.json与当前的 VSCode 版本(1.64.2)相比,其中的 VSCode 引擎非常旧(1.32.0)。我刚刚将引擎更新为与我的 VSCode 版本相同package.json

    "engines": {
        "vscode": "^1.64.2"
    },

并且测试运行器继续进行而不是像以前那样出错。

不幸的是,我又遇到了另一个错误:

错误:当前仅当没有其他代码实例正在运行时才支持从命令行运行扩展测试。

这是一个不同的问题,也是目前VSCode 的一个限制(1.64.2),尽管有一个解决方法


推荐阅读