I tried to make my own extension for Visual Studio Code and ran in some issue. I did everything like in the guide from https://code.visualstudio.com/api/get-started/your-first-extension. My vsce version is 2.16.0, my npm version is 9.2.0
First I ran
yo code
and generated an extension with the name "test". Then I ran
cd test
vsce package
and expected a file called something like test.vsix
but got the following error:
ERROR Extension entrypoint(s) missing. Make sure these files exist and aren't ignored by '.vscodeignore':
extension/dist/extension.js
The file mentioned in the error message (.vscodeignore
):
.vscode/**
.vscode-test/**
out/**
node_modules/**
src/**
.gitignore
.yarnrc
webpack.config.js
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
But even if I empty this file there is still the same error. Why? What did I forget?
I have no idea why, but it seems like the default npm and node versions on Linux just don't work correctly in that case. Like in ERROR Extension entrypoint(s) missing while I'm trying to package a developed vscode extension with vsce
I completely uninstalled node and npm from my system, even deleted the npm
directory from my global node_modules
and then followed the guide on https://github.com/nodesource/distributions#using-ubuntu to reinstall everything.
Now it suddenly works...