OS: Ubuntu 16.04 VS Code Version: 1.32.3
I can't install any extensions for my vs code. When I click "install", the error
"Cannot read property 'local' of undefined"
I also tried to install manually, and it doesn't work too.
Troubleshooting# If you find IntelliSense has stopped working, the language service may not be running. Try restarting VS Code and this should solve the issue. If you are still missing IntelliSense features after installing a language extension, open an issue in the repository of the language extension.
Starting in version 0.12. 3 of the extension, there is a command to reset your IntelliSense database. Open the Command Palette (Ctrl+Shift+P) and choose the C/C++: Reset IntelliSense Database command.
It is most probably because Code doesn't have privilege to write to the extension folder, which is by default ~/.vscode/extension.
The following command from terminal will fix it:
sudo chown -R $(whoami) ~/.vscode
I experienced the same problem on Windows 10. Permissions in my case were not the problem. Try clearing the contents extensions folder which can normally be found here;
C:\Users\USERNAME\.vscode\extensions
This fixed the issue for me.
If you're looking more details on any error that might be causing your problems, try the following steps to open the developer console to check for errors.
CTRL+SHIFT+P >> Developer: Toggle Shared Process
When I tried this I got the following errors (prior to clearing the extensions folder);
Uncaught (in promise) Error: EPERM: operation not permitted, open 'C:\Users\Ryan\.vscode\extensions\.obsolete'
and
Uncaught (in promise) W: EPERM: operation not permitted, open 'C:\Users\Ryan\.vscode\extensions\.obsolete'
at t.push.scanUserExtensions.then.e (file:///C:/Program Files/Microsoft VS Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:257:223)
Visual Studio Code Windows Error
If you get Cannot read property 'id' of undefined
in vscode, there is probably a custom setting in C:\Users\myself\AppData\Roaming\Code\User\settings.json
with a reference to a thing that is no more available. In my case it was a changed theme name, so the old name could not be referenced any more.
After removing that setting, the problem was solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With