Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: "extension/package.json not found inside zip." when repackaging and installing VSIX

I've downloaded a VSIX extension for VSCode here:

https://marketplace.visualstudio.com/items?itemName=mblode.twig-language-2

I've then tested this VSIX in VSCode and it installs, no problem.

At this point I then uninstall, rename the VSIX to a zip and then unzip to make edits.

The only edit I'm making is adding Indent rules in the Language config.

I then rezip (using macOS Finder) and rename to a VSIX file extension.

Upon trying to install again in VSCode I get the error "extension/package.json not found inside zip."

There is one at that path so I'm uncertain what the issue is.

Help appreciated.

like image 478
mistermist Avatar asked Mar 10 '26 11:03

mistermist


1 Answers

I think chances are that the repackaged .zip does not have the correct format. If you use the offical vsce tool for this instead, the .vsix you end up with should definitely be valid.

First install it (requires NPM to be installed) with:

npm install -g vsce

Then you should be able to just switch to the directory where you've installed the extension (~/.vscode/extensions/<name>) and run:

vsce package
like image 192
Gama11 Avatar answered Mar 13 '26 20:03

Gama11