Search code examples
visual-studioworkspace

RelativePattern not available


I'm trying to make my vscode extension compatible with multi-root workspaces - and I'd like to get files from a specific workspace. Problem is - in my version this type "RelativePattern" is not available - and I have no clue on how to make it available. As far as I know, I updated all libraries.


Solution

  • You may have an old version of the API definitions. To update it, update the vscode engine version in your package.json:

    {
        "engines": {
             "vscode": "^1.21"
        }
    }
    

    Then run the post install script again:

    npm run postinstall
    

    or:

    node ./node_modules/vscode/bin/install