VS Code does not recognize file extensions. Cant install any extensions - visual-studio-code

I have used vs code for a long time and it always worked fine. Suddenly today vs code does not recognize file extensions. Whether .js or .css it marks them always as plain text file.
Then I saw that all my extensions somehow are not installed anymore and when I try to install them again, it gives an error:
2023-02-14 12:48:17.453 [info] Electron sandbox mode is enabled!
2023-02-14 12:48:17.489 [warning] Via 'product.json#extensionEnabledApiProposals' extension 'github.vscode-pull-request-github' wants API proposal 'commentsResolvedState' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
2023-02-14 12:48:18.714 [error] Error scanning installed extensions:
2023-02-14 12:48:18.715 [error] SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.factory (vscode-file://vscode-app/c:/Users/kilia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/workbench/workbench.desktop.main.js:741:99212)
2023-02-14 12:48:19.980 [error] SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.factory (vscode-file://vscode-app/c:/Users/kilia/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
...
I tried to remove all extensions folders from C:\Users\kilia.vscode\extensions and install it after removing, but it did not work.

Related

can't install python extension in vscode

I am trying to install python extension in vscode latest version and I can't it
show to me Error while installing 'Python' extension. Please check the log for more details.
the output in log is
[2022-08-25 21:34:08.006] [renderer1] [error] Corrupt ZIP: end of central directory record signature not found: Invalid: Corrupt ZIP: end of central directory record signature not found
at Q.downloadExtension (vscode-file://vscode-app/c:/Users/Zakaria/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169227)
at async Q.doRun (vscode-file://vscodeapp/c:/Users/Zakaria/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:168169)
[2022-08-25 21:37:57.509] [renderer1] [error] ["Invalid: Corrupt ZIP: end of central directory record signature not found"," at Q.downloadExtension (vscode-file://vscode-app/c:/Users/Zakaria/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169227)"," at async Q.doRun (vscode-file://vscode-app/c:/Users/Zakaria/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:168169)"]
[2022-08-25 21:37:57.516] [renderer1] [error] Corrupt ZIP: end of central directory record signature not found: Invalid: Corrupt ZIP: end of central directory record signature not found
at Q.downloadExtension (vscode-file://vscode-app/c:/Users/Zakaria/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:169227)
at async Q.doRun (vscode-file://vscode-app/c:/Users/Zakaria/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:83:168169)
I am trying to install manually
using this command after download extension but i get t same problem
code --install-extension ms-python.python-2022.12.1.vsix
so I uninstall vscode and delete the file extension and reinstall again but I get the same problem .
can any one help me ????
If you install these extensions on vscode and it gives an error, change the net!
I can install add-ons without problems with the first mobile net, but not with other nets (especially ADSL).
If you don't have the first mobile note available, try F-Y-L-T-R Shekan with the same note.

Swift build error_if_any_output_files_are_specified_they_all_must_be

When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.
<unknown>:0: error: if any output files are specified, they all must be
Command CompileSwift failed with a nonzero exit code
I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.
https://www.google.com/search?q=error_if_any_output_files_are_specified_they_all_must_be
Does anyone know how this error is actually triggered, or what I can do to fix it?
Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.
The solution for us was to set Compilation Mode to Incremental instead of Whole Module.
This means, you have to ignore the Validate Project Settings warning:

eslint / babel-eslint issue with escope

Currently getting this error when i try to run eslint locally:
Error: Cannot find module 'escope'
at Function.Module._resolveFilename (module.js:455:15)
at monkeypatch (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:53:26)
at Object.exports.parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/babel-eslint/index.js:358:5)
at parse (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:671:23)
at Linter.verify (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/linter.js:806:27)
at processText (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:278:31)
at processFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:320:18)
at executeOnFile (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:655:25)
at fileList.forEach.fileInfo (/Users/pablorincon/Documents/SSENSE/micro-services/ws-website/services/ui-website/node_modules/eslint/lib/cli-engine.js:693:13)
at Array.forEach (native)
What's weird is that im using the same linting configuration with another project, and i had no issues at all.
I'm using:
babel-eslint#7.1.1
eslint#4.0.0-beta.0
Any ideas ?
Even though I had same package.json, babel-eslint was set as "7.1.1" in one and "^7.1.1" in the other.
Basically ESLint v4 uses a new fork of escope, which was then updated on version 7.2.3 of babel-eslint.
So, adding the little ^ to my configuration fixed my problem.

Over 1700 errors compiling vscode, what is configured incorrectly?

I am following the GitHub instructions to contribute to the Visual Studio Code (vscode) project. The instructions I am following are here:
https://github.com/Microsoft/vscode/wiki/How-to-Contribute
I am on Windows 10 and therefore following the Windows-specific instructions.
When I run 'npm run watch' after fulfilling the pre-requisites, I get over 1700 errors when it attempts to build.
Sample errors:
[16:56:59] Finished 'clean-client' after 3.78 s
[16:56:59] Starting 'watch-client'...
[16:57:25] Error:E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(22,21): Cannot find name 'Date'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(23,15): Cannot find name 'Object'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(40,31): Cannot find name 'Date'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(44,80): Cannot find name 'Date'.
[16:57:25] Error: E:/src/git/vscode/extensions/css/server/src/languageModelCache.ts(50,22): Cannot find name 'Number'.
The full error list is here:
http://pastebin.com/wJgEQ18m
I am trying to find out how to troubleshoot and correct these errors. So far I have not found anything online to point me to what I did wrong in setting things up.
It turns out this was caused by a bug in the gulp-tsb project, which was just fixed with the commit below.
https://github.com/jrieken/gulp-tsb/commit/ea84a0a16a631410071ae96336ac9f3842ec41b0
Upgrading to the new gulp and typescript tools fixed the problem.

error 'Arguments to path.join must be strings' when adding custom Plugin Phonegap 3.0

this is a port of an older twitter plugin that I am just trying to get to work with PG > 3.0, I have this working fine on my IDE, so I wanted to share with others, for some reason when I try and do the install via NPM it errors. I have re-read the file system structure and plugin.xml specification, and cannot see any errors.
I even changed the ID of the plugin from CDVPluginTwitter incase the prefix was throwing an error, however I still get
path.js:360
throw new TypeError('Arguments to path.join must be strings');
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
at Object.exports.join (path.js:358:36)
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/plugman/src/util/plugins.js:72:39
at /usr/local/lib/node_modules/phonegap/node_modules/cordova/node_modules/shelljs/shell.js:1707:7
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
The Git is located here, https://github.com/ednasgoldfishuk/CDVPluginTwitter/tree/master
Any ideas?
It was missing the finishing </plugin> tag in plugin.xml, Github has been updated and now is confirmed installable on PhoneGap 3.0 +