Ana H
Ana H

Reputation: 21

Not able to install extensions in Visual Studio Code (VSC)

VSC version is latest (1.79.2) My computer has Windows 10

I have installed multiple times VSC in last 2 days, and every time I have the following error when opening VSC: "[error] Error scanning user extensions: Unexpected non-whitespace character after JSON at position 718"

No VSC extension is installed, since every time I try to install an VSC extension I am getting the error "[error] SyntaxError: Unexpected non-whitespace character after JSON at position 718"

I have tried various solutions found on Internet, without success:

  1. added Code.exe to Windows 10 Firewall
  2. checked that my computer does not have proxies in the System (and User) Environment Variables
  3. used same Settings.json file as another computer on which VSC extensions can be installed
  4. uninstalled and installed VSC on another computer, on which VSC extensions can be installed

I also opened an issue ticket on the VS Code GitHub repo: https://github.com/microsoft/vscode/issues/185436.

Upvotes: 2

Views: 4589

Answers (1)

Mark
Mark

Reputation: 182771

There are a number of things you can try in this case.

  1. Run the command Help: Start Extension Bisect in case there is an extension still causing problems. This can happen even in a re-install if there were extensions previously installed.

  2. Run the command Extensions: Open Extensions Folders - this will show you where the extensions folder is located on your machine.

    a. In that folder, delete the extensions.json file. It contains information about any previously installed extensions, even if they were later disabled. If there are still enabled extensions this file will be re-created on a reload so it is okay to delete it. There is a chance that on the re-creation of the extensions.json file that a problem in it will be fixed.

    b. Delete the entire extensions folder you find after the Extensions: Open Extensions Folders command. You will have to reinstall any extensions you want but that would give you an opportunity to see if one of them causes you to be unable to install any more.

  3. Downgrade your version of vscode. Go to vscode updates and choose which version you want to download.

Upvotes: 2

Related Questions