VS Code source control does not reflect GIT changes - javascript

I use a MacOS laptop on Ventura(13.0.1) and I use VS code version 1.74.3 (Universal), When I make changes in my Vscode, the source control panel is not reflecting the changes I made and the notification centre of VScode shows the below error:
When I check the Vscode Developer Logs, I see the following errors
2023-01-24 20:03:13.166 [error] [File Watcher (parcel)] Unexpected error: No such file or directory (EUNKNOWN) (path: /Users/UserName/Desktop/folder)
2023-01-24 20:03:13.167 [error] [File Watcher (universal)] restarting watcher after error: No such file or directory
2023-01-24 20:03:13.918 [error] [File Watcher (parcel)] Unexpected error: No such file or directory (EUNKNOWN) (path: /Users/UserName/Desktop/folder)
2023-01-24 20:03:13.919 [error] [File Watcher (universal)] restarting watcher after error: No such file or directory
I have tried deleting VS code applications and also deleted the folders at $HOME/Library/Application Support/Code and ~/.vscode still the same error.

Related

How to import JavaScript files (fabric.js) in a vaadin Application

I'm working on a Vaadin application which is using spring boot.
I want to use the fabric.js framework, but have not managed to import the files without running into Errors yet.
When trying to use the #JavaScript Annotation, I run into following Error:
[v-server-output] c.v.b.devserver.DevServerOutputTracker : ERROR in ./fabric.min.js
[v-server-output] c.v.b.devserver.DevServerOutputTracker : Module not found: Error: Can't resolve 'jsdom' in 'C:\entwicklung\grw2_new\app-and-run\applications\grw\grw-desktop\frontend'
After trying it with a npm installation(https://vaadin.com/directory/component/niiyeboahfabric-canvas), I ran into a similar Error:
[ERROR] ERROR in ../node_modules/tunnel-agent/index.js
[ERROR] Module not found: Error: Can't resolve 'net' in '/.../node_modules/tunnel-agent'
...
[ERROR] # ../node_modules/jsdom/lib/api.js
[ERROR] # ./fabric.min.js
To avoid the jsdom Error I tried to import the file in a onAttach Method using UI.getCurrent().getPage().addJavaScript("frontend/fabric.min.js");
But Vaadin does not manage to find the specified file, whether I put them in the frontend folder of my project or in META-INF/resources/frontend.

Undefined error in build version with electron

I have an electron app, the app is working when I am running:
npm run electron-dev
I am creating a build folder using react-scripts:
yarn react-scripts build
Than I am trying to build it using electron builder with the command:
yarn electron-builder -c.extraMetadata.main=build/electron.js
This is working well and I am getting a dist and a build folders with the compiled app and a build.
But when I am clicking the app I am getting:
A JavaScript error occurred in the main process
Uncaught Exception:
undefined: undefined
Compilation success messages
When running the app via electron-dev (on the build folder or on the public folder) I am getting no errors, but I am getting 3 warning messages, 2 from firebase - "When deploying Firebase apps to production, it is advisable to only import the individual SDK components you intend to use.", "Warning: This is a browser-targeted Firebase bundle but it appears it is being run in a Node environment." and 1 about security "Electron Security Warning (Insecure Content-Security-Policy) This renderer process has either no Content Security Policy set or a policy with "unsafe-eval" enabled.".
TD;DR: How can I understand where the error is coming from and why, if the error shows only undefined: undefined?
Maybe through try and catch but than how can I display it on the error I am getting?
I'm working on Mac OSX (But it does not looks like this is the problem), I am using opencv4nodejs which takes a long time to compile, also I am using some json files to store app data using electron-json-storage.

How to properly connect linter in Atom with jshint

I want to use the linter package in the Atom Editor. I have installed the packages "linter" and "linter-jshint". Additionally I installed jshint via npm (globally) and downloaded the jshint-repo from GitHub.
When I just try to run the linter on an open .js file in Atom, it fails with message "Error running JSHint". The same happens if I point the executablePath for linter-jshint in the Atom config to the downloaded repo folder.
When I set the executablePath to the node.js Module ("linter-jshint": executablePath: "C:/Users/Username/AppData/Roaming/npm/node_modules/jshint") it just shows a warning ("JSHint return an invalid response, check your console for more info"). Developer Tools console shows:
[Linter-JSHint] SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at Object. (main.js:157)
at Generator.next ()
at step (C:\Users\Username.atom\packages\linter-jshint\lib\main.js:3)
at process._tickCallback (internal/process/next_tick.js:103)
What am I doing wrong? Do I have to point to another subdir or a specific file?
Username contains space and a german umlaut "รถ".
PS: I can execute jshint from command line and it works.
On Executable Path field, you should actually point to jshint executable file, like this:
H:\node_modules\jshint\bin\jshint

Ionic build android on Linux

When I run ionic build android, I get this error:
shell.js: internal error
Error: ENOENT: no such file or directory, open '/home/darko/Downloads/todo/false/shelljs_2da7bb00de48ebd25547'
at Error (native)
at Object.fs.openSync (fs.js:584:18)
at Object.fs.writeFileSync (fs.js:1224:33)
at execSync (/usr/local/lib/node_modules/ionic/node_modules/shelljs/src/exec.js:56:6)
at Object._exec (/usr/local/lib/node_modules/ionic/node_modules/shelljs/src/exec.js:179:12)
at Object.exec (/usr/local/lib/node_modules/ionic/node_modules/shelljs/src/common.js:168:23)
at Object.getLinuxEnvironmentInfo (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/info.js:187:24)
at Object.getOsEnvironment (/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/info.js:204:20)
at Object.t (/usr/local/lib/node_modules/ionic/lib/utils/stats.js:147:15)
at Object.run (/usr/local/lib/node_modules/ionic/lib/cli.js:135:16)
Please take note that path from the error:
ENOENT: no such file or directory, open '/home/darko/Downloads/todo/false/shelljs_2da7bb00de48ebd25547'
contains directory false, which I don't have..I think that should be node_modules instead of false.
Also, I had several problems before this error which I solved somehow, but I think I will get more errors as I go forward. Am I doing something fundamentaly wrong?

Getting error when trying to start ember server

I am trying to start my server from within my app using the command;
ember serve
However I get a no such file or directory error as below;
version: 1.13.8
Livereload server on http://localhost:49156
Serving on http://localhost:4200/
ENOENT, no such file or directory 'C:\MyApp\mycode\tmp\concat_with_maps-input_base_path-tfPGUnEW.tmp\0\bower_components\ember-template-compiler\index.js'
Error: ENOENT, no such file or directory 'C:\MyApp\mycode\tmp\concat_with_maps-input_base_path-tfPGUnEW.tmp\0\bower_components\ember-template-compiler\index.js'
at Error (native)
at Object.fs.statSync (fs.js:797:18)
at ConcatWithMaps.keyForFile (C:\MyApp\mycode\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\index.js:91:55)
at Array.map (native)
at ConcatWithMaps.CachingWriter._conditionalBuild (C:\MyApp\mycode\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\index.js:107:61)
at C:\MyApp\mycode\node_modules\ember-cli\node_modules\broccoli-sourcemap-concat\node_modules\broccoli-caching-writer\node_modules\broccoli-plugin\read_compat.js:61:34
at lib$rsvp$$internal$$tryCatch (C:\MyApp\mycode\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:493:16)
at lib$rsvp$$internal$$invokeCallback (C:\MyApp\mycode\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:505:17)
at lib$rsvp$$internal$$publish (C:\MyApp\mycode\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:476:11)
at lib$rsvp$asap$$flush (C:\MyApp\mycode\node_modules\ember-cli\node_modules\rsvp\dist\rsvp.js:1198:9)
Where should I look to fix the issue?

Categories