Unable to install or update extensions in VS Code

Rishant Jayaswal 5 Reputation points
2024-01-01T12:09:04.34+00:00

Alright, so last evening I opened VS Code and found the "Prettier" extension to be missing...Naturally, I searched for it and tried to install it..but apparently it shows this error - "Error while installing 'Prettier - Code formatter' extension. Please check the log for more details."

this is what the log mentions: 2023-12-31 09:50:32.450 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-python.python' wants API proposal 'registerIssueDataProvider' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned. 2023-12-31 09:50:33.014 [info] Started local extension host with pid 14752. 2023-12-31 09:50:35.867 [info] [perf] Render performance baseline is 67ms 2023-12-31 09:51:51.436 [error] Error: Unable to write file 'vscode-userdata:/c:/Users/hp/.vscode/extensions/extensions.json' (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, rename 'c:\Users\hp\.vscode\extensions\extensions.json.vsctmp' -> 'c:\Users\hp\.vscode\extensions\extensions.json') at E.writeFile (c:\Users\hp\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:56:16811) at async Object.factory (c:\Users\hp\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:100:83319) 2023-12-31 09:51:51.474 [error] Unable to write file 'vscode-userdata:/c:/Users/hp/.vscode/extensions/extensions.json' (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, rename 'c:\Users\hp\.vscode\extensions\extensions.json.vsctmp' -> 'c:\Users\hp\.vscode\extensions\extensions.json'): Error: Unable to write file 'vscode-userdata:/c:/Users/hp/.vscode/extensions/extensions.json' (NoPermissions (FileSystemError): Error: EPERM: operation not permitted, rename 'c:\Users\hp\.vscode\extensions\extensions.json.vsctmp' -> 'c:\Users\hp\.vscode\extensions\extensions.json') at E.writeFile (c:\Users\hp\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:56:16811) at async Object.factory (c:\Users\hp\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\node\sharedProcess\sharedProcessMain.js:100:83319)

The version of VS Code I'm using: 1.85.1(user setup) OS: Windows 11

Note: I have already tried the below mentioned fixes, but nothing seems to work: 1: Installing from VSIX 2: Running as Administrator 3: Changing the DNS

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
228 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Emmanuel Kwoba 15 Reputation points
    2024-03-02T11:11:44.6933333+00:00

    I had the same problem;

    Go to 'c:\Users\hp\.vscode\extensions\extensions.json' on your computer and rename the extensions.json file you can add an extra s to make it extensionss.json. Then go back to vscode and install the extension of your choice, a new extensions.json file will be created.

    You can go ahead and delete the extensionss.json file.

    All the best!

    3 people found this answer helpful.

  2. Tianyu Sun-MSFT 31,326 Reputation points Microsoft Vendor
    2024-01-02T03:36:32.48+00:00

    Hello @Rishant Jayaswal ,

    Welcome to Microsoft Q&A forum.

    The error message indicates that operation not permitted, perhaps it’s blocked by permission limitation. Please find the file(s) that mentioned in error message, right-click the file, select Properties, switch to Security tab, select the corresponding user, click Edit…, confirm that the account has been assigned the proper permissions.

    Try to reboot your machine and directly open VS Code and install the extension(in case the file is locked by other program/process).

    Besides, is there any permission limitation on your machine? Are you using any antivirus software/extension/proxy? If so, please try to disable them temporarily and test again.

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.