Search code examples
javascriptnode.jsvisual-studio-codevscode-extensions

ERROR Extension entrypoint(s) missing while I'm trying to package a developed vscode extension with vsce


I'm developing a VSCode extension to automate some edit & search processes. Everything runs Ok! in the Extension Development Host but when I try to package the extension with vsce inside the extension's folder the app responds with this error:

 ERROR  Extension entrypoint(s) missing. Make sure these files exist and aren't ignored by '.vscodeignore':
  extension/extension.js

At the extension's manifest(package.json) the entrypoint to the extension code is defined in the "main" key:

...
"activationEvents": [
        "onCommand:extension.findBlock"
],
"main": "./extension.js",
"contributes": {
    "commands": [
        {
        "command": "extension.findBlock",
        "title": "Find Block"
        }
    ],
...

In the extension's folder everything is as the visual studio extension generator(yo) left it.

.
├── block_finder.code-workspace
├── CHANGELOG.md
├── extension.js
├── findBlock.png
├── jsconfig.json
├── node_modules
├── package.json
├── package-lock.json
├── prueba.txt
├── README.md
├── test
└── vsc-extension-quickstart.md

Am I missing something? I don't understand what could be happening. My VSCode version is 1.65.2 and vsce is 2.7.0. Thanks!


Solution

  • I came back to say that I solved the problem by uninstalling the npm manager. The version I had installed was old and I noticed that in the installation of the extension requirements it installed packages with warnings of deprecated versions. I uninstalled npm and did a clean install and my extension started working as expected. Sorry for leaving this post open and thanks for all the help you have given me.