Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error detecting icon when publishing VSCode extension

I'm putting together a VSCode extension and I've already packaged up the .vsix file a few times with no issue.

However, I've just added "icon": "images/icon.png" to the package.json and started getting an error message I just can't shake:

Error: The specified icon 'extension/images/icon.png' wasn't found in the extension.

The file definitely exists (though I don't quite understand why it looks for it under extension as a hardcoded value).

I've tried setting the baseImagesUrl in the command line for packaging, but it seems to have made no difference.

Any help/insight here would be appreciated :)

like image 471
aaron-bond Avatar asked Dec 23 '22 17:12

aaron-bond


1 Answers

It turns out the default .vscodeignore file that is dropped when you generate the extension boiler plate code has the images/** file ignored. That stops the vsix package command from pulling the icon into the package and it won't find it.

Hope this helps someone else!

like image 79
aaron-bond Avatar answered Dec 28 '22 10:12

aaron-bond