VS code failed to load extensions and failed to install new extension after an update - vscode-extensions

Today I reopen my VS Code after several days, found the extensions that I installed and used for a long time disappeared totally, and it recommended me to install extension for java. OK, I followed the recommends to install extension, and failed.
I checked my Code version, it's the latest version surely.
Then I dipped into the log and tried to install some other extensions, and found the failure always related to one js file sharedProcessMain.js. The detail log is as following:
2023-02-16 09:32:06.725 [error] SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.factory (vscode-file://vscode-app/d:/Users/MI/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
2023-02-16 09:32:06.771 [error] Unexpected end of JSON input: SyntaxError: Unexpected end of JSON input
at JSON.parse (<anonymous>)
at Object.factory (vscode-file://vscode-app/d:/Users/MI/AppData/Local/Programs/Microsoft%20VS%20Code/resources/app/out/vs/code/electron-browser/sharedProcess/sharedProcessMain.js:88:93520)
If anyone who can provide any suggestion? Thank you very much!

On what OS are you running?
I use Windows and I faced the same problem yesterday. Solved it by
Closing VSCode
Removing the entire folder %appdata%\Code
Removing the entire folder %userprofile%\.vscode
Starting VSCode
Hope this helps.

Related

how to solve module build failed after changing file extension ( *.ts => *.tsx )?

after changing a specific file's extension from .ts to .tsx I get:
Compiled with problems:X
ERROR in ./src/components/SomeComp/someFile.ts
Module build failed (from ./node_modules/source-map-loader/dist/cjs.js):
Error: ENOENT: no such file or directory, open '.../someFile.ts'
ERROR
No files matching 'C:\Users...\src\components\SomeComp\someFile.ts' were found.
it has happened recently and somehow figured out on its own,
then i switched branches and when returned it happened again
I tried what was suggested here, clearing the browser cache How to get Chrome to reload source maps?
also restarted the react dev server couple of times
but still it tries to find the file with the old .ts extension...
searched as much as I could but didn't find a solve...
edit:
after changing the extension back and forth and restarting the dev server it has figured out, but I would still love to know what was happening and what perhaps what should be done to handle this situation correctly in the future

Cannot use import statement outside a module when using wrangler v2

I'm new to using cloudflare and wrangler. I've a project that I've been working on, and I'm now trying to deploy it using wrangler publish, but I keep running into issues. My product is coded in node.js, and I'm using version 2 of wrangler. When I execute wrangler publish I get:
Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2Basic JavaScript project found. Skipping unnecessary build!
Error: Something went wrong with the request to Cloudflare...
Uncaught SyntaxError: Cannot use import statement outside a module
at worker.js:2
I've searched for a solution, and one of them that I found said to change module in wrangler.toml from type="javascript"to type="webpack" however that gives me a bunch of errors:
./node_modules/destroy/index.js
Module not found: Error: Can't resolve 'fs' ... Parsed request is a module...resolve as module
/Users/Desktop/APIs/cpiCalculator2/node_modules/destroy/node_modules doesn't exist or is not a directory
...
Error: webpack returned an error. You may be able to resolve this issue by running npm install.
I've tried reinstalling npm as it suggests and then wrangler publish again, but that just gives me the same error message.
I'm really not sure what the issue is, and I would really appreciate any help or advice on how to resolve this issue. Thank you!
Also, just a note, I'm not sure if this is affecting it, but I do have two other js documents in the main area of my project (where my index.js file is).

compile errors after upgrading to latest CRA

I just updated to latest create-react-app (web pack 5). And am now getting the following errors (I'm just showing the first 2 errors here). Any help explaining what this error means and how to fix it would be greatly appreciated. I don't think the problem is with react-pdf because I created a new create-react-app project that uses that package and there's no problem.
{
Compiled with problems:X
ERROR in ./node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm/inherits.js 1:0-46
Module not found: Error: Can't resolve './setPrototypeOf' in '/Users/bob/dev/workbox-web/node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm'
Did you mean 'setPrototypeOf.js'?
BREAKING CHANGE: The request './setPrototypeOf' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
ERROR in ./node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm/objectWithoutProperties.js 1:0-74
Module not found: Error: Can't resolve './objectWithoutPropertiesLoose' in '/Users/bob/dev/workbox-web/node_modules/react-pdf/node_modules/#babel/runtime/helpers/esm'
Did you mean 'objectWithoutPropertiesLoose.js'?
BREAKING CHANGE: The request './objectWithoutPropertiesLoose' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
}
Somehow I was accessing a wrong version of babel after CRA upgrade to 5. Deleting node_modules and re-installing was not enough. I needed to delete node_modules and yarn.lock and then yarn install - and then all was ok.

An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2)

I'm getting such error, while building IOS app in React Native project:
was encountered processing the command (domain=NSPOSIXErrorDomain,
code=2) Print: Entry, ":CFBundleIdentifier", Does Not Exist
I read threads in GitHub regarding that issues, however didn't find solutions there which could solve my problem. Any ideas how to fix it?
The cause might be that you have some build files from the previous build which are causing the problem.
Clear the ios/build/your_project to trigger a fresh build
In my case the Xcode build folder needed to be cleaned. To fix, in Xcode go to Product | Clean Build Folder
In my case, the cause was - The build file name was MyMob.app but the app it tries to install to the simulator was mymob.app.
I solved it by changing the line in mymob.xcscheme:46
BuildableName = "MyMob.app"
BuildableName = "mymob.app"
Log was
iinfo Installing "build/mymob/Build/Products/Debug-iphonesimulator/mymob.app"
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
info Launching "com.mymob.app"
error Failed to launch the app on simulator, An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=4):
The request to open "com.mymob.app" failed.
Underlying error (domain=FBSOpenApplicationErrorDomain, code=4):
The operation couldn't be completed. Application info provider (FBSApplicationLibrary) returned nil for "com.mymob.app"
Application info provider (FBSApplicationLibrary) returned nil for "com.mymob.app"

Issue with OpenCart module - CodeManager

I have issues with one OpenCart module called CodeManager. I tried installing it several times but every time I get these warnings:
Warning: include(/home/johnsimo/public_html/vendors/codemanager/languages/Array.php) [function.include]: failed to open stream: No such file or directory in /home/sdcom/public_html/game/vendors/codemanager/common.php on line 93
Warning: include() [function.include]: Failed opening '/home/johnsimo/public_html/vendors/codemanager/languages/Array.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/sdcom/public_html/game/vendors/codemanager/common.php on line 93
Anybody has any idea on how to fix this?
Basically its saying your missing some files from the extension try reinstalling if that doesnt work contact the person you got it off and get a working copy
please try again to re install this process. or give them to file permission access. may be problem could be there.