Many extensions for Visual Studio Code have the have the following in their package.json, including Microsoft's own PowerShell extension:

"scripts": {
    "postinstall": "node ./node_modules/vscode/bin/install"

The vscode package is listed under devDependencies, but Visual Studio Code only installs dependencies (not devDependencies) when an extension is installed.

Since I haven't found an answer to this in the documentation, I was hoping someone here could answer this: What is this script used for? When is it necessary to include it in my own extension manifest?

  • Could it be that it is run when developing the extension and doing npm i? – PEZ Feb 1 at 7:53

That postinstall script is responsible for downloading the latest vscode.d.ts file


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.