Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to build .vsix? #8

Open
zhaoqingqing opened this issue Mar 29, 2022 · 0 comments
Open

how to build .vsix? #8

zhaoqingqing opened this issue Mar 29, 2022 · 0 comments

Comments

@zhaoqingqing
Copy link

zhaoqingqing commented Mar 29, 2022

how to build .vsix file? i want to custom some menu.

my vscode version :1.65.2 x64 ,my os : windows 10 x64
i use command in cmd:

npm install
npm install vscode
vsce package

get error:

 D:\Code\vstortoise> npm install vscode
npm WARN deprecated [email protected]: This package is deprecated in favor of @types/vscode and vscode-test. For more information please read: https://code.visualstudio.com/updates/v1_36#_splitting-vscode-package-into-typesvscode-and-vscodetest
npm WARN deprecated [email protected]: This package has been renamed to @vscode/test-electron, please update to the new name

added 18 packages, removed 132 packages, and audited 78 packages in 3s

3 packages are looking for funding
  run `npm fund` for details

4 vulnerabilities (3 moderate, 1 high)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

use pack command , get error:

PS D:\Code\vstortoise> vsce package
Executing prepublish script 'npm run vscode:prepublish'...

> [email protected] vscode:prepublish
> npm run compile


> [email protected] compile
> tsc -p ./

src/extension.ts:40:9 - error TS2532: Object is possibly 'undefined'.

40         window.activeTextEditor.document.save().then(()=>{
           ~~~~~~~~~~~~~~~~~~~~~~~


src/Utils.ts:5:59 - error TS2532: Object is possibly 'undefined'.

5     return (context && context.fsPath) ? context.fsPath : window.activeTextEditor.document.fileName;
                                                            ~~~~~~~~~~~~~~~~~~~~~~~


 ERROR  npm failed with exit code 2
PS D:\Code\vstortoise>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant