用vsce打包开发好的插件版本,会报错
F:\Users\Abc\Desktop\VscodeExtension>call yarn vsce package
yarn run v1.22.22
warning package.json: No license field
$ F:\Users\Abc\Desktop\VscodeExtension\node_modules\.bin\vsce package
F:\Users\Abc\Desktop\VscodeExtension\node_modules\undici\lib\web\fetch\response.js:528
ReadableStream
ReferenceError: ReadableStream is not defined
解决方案:
- 删除 node_modules、package-lock.json
- 工程目录下
npm cache clean -f
npm install
npm i cheerio@1.0.0-rc.10
npm install vsce@2.15.0
`或
`npm install @vscode/vsce@3.3.2
npx vsce package
附 node v16.18.1 支持的包版本
@types/mocha@10.0.10
@types/node@20.17.32
@types/vscode@1.99.1
@typescript-eslint/eslint-plugin@8.31.1
@typescript-eslint/parser@8.31.1
@vscode/test-cli@0.0.10
@vscode/test-electron@2.5.2
@vscode/vsce@3.3.2
cheerio@1.0.0-rc.10
eslint@9.25.1
jszip@3.5.0
polyfill@0.1.0
typescript@5.8.3
vsce@2.15.0
whatwg-streams@0.1.1