3

I created an extension for adding test files in Ruby on Rails - https://github.com/SimonBo/rails-go-to-test. It works when I test it locally (press F5 from VSCode with the extension code open) but when I package the extension and install it i get => "command 'extension.goToTest' not found". The problem is probably with runtime dependencies but not sure how to fix this.

Szymon Borucki
  • 407
  • 4
  • 13
  • 1
    Before triggering that "not found" error, make sure you oipen the Developer Tools, https://stackoverflow.com/questions/30765782/what-is-the-use-of-the-developer-tools-in-vs-code/30765915#30765915 There you will see a more detailed call stack showing the exact error. Usually such is caused by missing files in your `vsce` generated package. You need careful analysis on the dependencies as well as supporting files. – Lex Li May 31 '20 at 03:03

2 Answers2

0

It might be that the version of VSCode you have on your computer is older than the version specified in your package.json.

    "engines": {
        "vscode": "^1.45.0"
    },

If you're certain that your extension will work with an older version like "^1.32.0" , update the engines key in your package.json as well as the version of @types/vscode, etc. in your devDependencies.

If this doesn't work, make sure that all the paths in your package.json are specified correctly.

Rohan Mukherjee
  • 280
  • 2
  • 7
0

Turns out I was using mkdirp but it wasnt specified in dependencies in package.json, adding the following line fixed everything:

"dependencies": {
    "mkdirp": "^0.5.1"
  }
Szymon Borucki
  • 407
  • 4
  • 13