Yarn tsc shows errors that no longer exist after merge - reactjs

I'm running yarn tsc on a React app before pushing to our repo. Before this, I merged from master and selected all current changes of my working branch. Before doing this, I had no typescript errors but now it shows typescript errors that don't exist on the working branch (They did exist on the incoming branch). I tried restarting the server and even quitting VSCode. Any ideas what might be happening?

Do you have any open deleted files?
I have had this happen before for deleted files open, and in VSCode it would just show a red dot next to a component directory and I had no idea what the issue was. Turned out a deleted file was still open in my editor, closed it and bam error gone.
Is it showing you where the errors occur, within the file?
You said you did do the VSCode command pallet command: TypeScript: Restart TS Server. If not I would run that.
Those are the 2 main things I can think of off the top of my head. #1 of my list was what caused this for me and it was truly difficult to figure out because I used to never close my tabs in my editor so I didnt see the plain as day error until I started closign them all and saw one labeled (deleted).

Related

Node error on compile React - internal/buffer:959

I recently got an error when compiling React projects. I launch the app normally, it launches my APP. But sometimes it happens to show the attached error and the application stops. So I need to run the start command again.
I tried removing node_modules folder and installing again, but it didn't work. I couldn't find the reason.
Any suggestion?
Print ERROR

Why is my VScode C compiler not working like it used to?

I have been learning C for a month now and I've been using VScode on mac to do it. I followed the following video(i.e by installing homebrew and mingw and installing extentions in VScode) and it ran exactly as shown in the video.
video---->https://www.youtube.com/watch?v=KhGnYWplLVo i.e it automatically opened a .json file after debugging.
I went to my class in the morning and it ran fine, but when I reached home and tried to run a program, it did not compile.
I used to f5(shortcut to debug) and a drop down menu popped which had GDB/LLDB and Microsoft. I used to click the GDB and it opened a .json file. I then ran the program and it would normally run in the terminal. But this time, there was a second popup after clicking GDB:-
-C/C++:gcc build and debug active file prelaunchTask C/C++:gcc build active file Detected task
-after clicking this option the following would appear and had to be closed several times one after another. This had never happened before::-
Developer tools access
And after doing this the following would be shown in vscode, and the .json file would not open:--
Debuggee TargetArchitecture not detected
The only thing I did after my class was download epic games launcher and a game from there.
Can anyone help me so that it can work again like it used to(as shown in video mentioned above).
Thanks a lot, this has been stressing me out a lot.

Why VS Code contains emphasized items but no error?

I'm writing a React project in VS code. I met this problem in VS code. In my project, this folder shows Contains emphasized items and I know it means there is an error in my files. But in the picture:
,
I have checked all files but no error was found. So this makes me feel confused.
I have searched this problem on google and found a similar GitHub issue. https://github.com/Microsoft/vscode/issues/54960
Use the command, CTRL+SHIFT+P on windows or COMMAND+SHIFT+P on mac, then search "Developer: reload window", click on it, your vs will reload and enjoy your stress-free coding.
Committing once with git can be resolved.
I can solve the problem react-native start --reset-cache and by reloading VS with the command Ctrl + shift + p and searching Developer: Reload Window
Just to know I was in an Angular project, using Windows, WSL, I created a service and after that I renamed it, when I committed the changes, I noticed this red mark.
I just pressed
Ctrl + Shift + P and then typed: Developer: Reload Window. It will just reload the entire project and the mark will disappear.
I saw this message after moving a file from one folder to another, renaming and committing everything to git.
The Visual Studio "Problems" window showed an issue with the "deleted" file. Somehow VS had left a window open for the original location of the file and in it's tab the file was labeled as "deleted". Closing that tab in VS got rid of the "Contains emphasized items"
This error is coming because sometimes we delete something so its need window reloading and to reload Type the command, CTRL+SHIFT+P on windows or COMMAND+SHIFT+P on mac, then search "Developer: reload window", click on it. It will reload the window and your error will be gone
This happens when you've deleted some files/folders from project and haven't yet added the event to a commit.
There is multiple solutions
Option 1: Close the VS code and open it again
Option 2: Commit your code chages in git(if you are using)
Option 3: Reload the VS code - Use the command, CTRL+SHIFT+P on windows or COMMAND+SHIFT+P on mac, then search "Developer: reload window", click on it
Had the same issue.
Committing multiple times from within the VS Code did not help.
However, once I added the files and committed from the shell, everything fell in place.
I noticed this when I working on a Rails application using Visual Studio Code editor.
I used an underscore for a directory name, that is instead of staticpages, I named the directory static_pages.
However, committing the code change using the below commands fixed it:
git add .
git commit -m "commit message"
That's all.
I hope this helps
In my case, the already deleted files were opened in the VS code. Closing those files resolved my issue.
This is an edge case but I am putting it here just in case it helps someone in the future...
I had accidentally done a git add . before I had fully set up my .gitignore file, so it had staged a couple folders with hundreds of files (mostly the entire Electron out folder) that I definitely didn't want in the repo.
This is the procedure I went thru to clean up my staged files:
updated .gitignore so that when I reverted the add I could be sure that GIT was ignoring the right files and folders (which worked, hundreds to 7, the moment I did the git reset)
git reset -f
noting that the correct files were now in line to be staged, I did:
git add .
git commit -m "message"
git push
When I returned to the regular file list, I noticed that node_modules was showing the "emphasized items" indicator. So just to make sure that I had actually gotten everything committed and such I tweaked .gitignore again (added node_modules/** just in case lol), did another commit, and still had the issue. Nothing helped, and like I said, it was confusing because the indicated files were under node_modules and it was in the ignore list.
So I hit cmd-p and ran Developer: Reload Window. It turned out out all I had to do was reload the window and the emphasized items went away entirely. Simple fix, confusing problem.
Apparently adding, reverting, then adding a subset of my directories confused vs code and it just needed to reload the window.
I had the same issue, pushing to git didn't solve the problem. I simply closed all files, cancelled my dev server and restarted VS Code. The emphasizing was gone.
this work for me :
I can solve the problem react-native start --reset-cache and by reloading VS with the command Ctrl + shift + p and searching Developer: Reload Window
In my case files that had been deleted were still opened in VsCode. After closing them (and also git commit as other posts suggest) helped solved the problem
git add .
git commit -m "your commit description"
If this not helps, after commit restart the VS CODE
Select this tab from toolbar - View -> Problems or Ctrl + Shift + M and on bottom Terminal you will see whats problem is it.
0
When I was working on a angular application in the Visual Studio Code editor, I observed this. And resolved it by simply restarting VSCode.
This error occurs because there are pending changes to be saved in git, so to solve this problem, open a command terminal and go to the folder where your project is located, execute the following commands
git add .
git commit -m "your commit description"
In my case it works with this.
VSCode using React. Changed a folder name in the src folder. Would not pass compilation after changing names of components. Committed to git. Restarted the app with npm start. All is well.
You may have hidden files. My Explorer was not listing hidden files in those directories. Hidden files on Linux begin with a . (for example, .hidden.txt)
Had the same issue, had copied files from a folder into another folder. git commit as suggested solved the issue.
commit the changes, if still, the error is there, reopen the vscode
I don't think so we need to involve git for this issue.
Just restart the vs-code and things will work like a rocket🚀
uninstall any extension if you have installed in vs code.It will be solved.

Build project to run it in eclipse

My code runs a previous version of itself, so even though i completely remove all the code, it still runs the old one. I've read a few other posts regarding this problem, and tried it out. My temporary solution is to build the project before running it, but that is kinda stupid. the .exe file is in the Release folder, and my Debug folder dissapeared after the Clean.
How do I stop needing to build the project before everytime I need to run it?
I found out there's a button called auto build in the Launch Configuration properties window. So it build everytime I run it.

error=13, Permission denied when adding event in CodenameOne

Suddenly, and for no apparent reason, whenever I try to add an event to a form element, like a button, in codenameone I get an error:
Cannot run program /path/to/project/src/theme.res: error=13,
Permission denied
This worked fine for several days before now. But now I get the error every time. I tried to create a brand new project from scratch and still get the error. What is really weird is that the /path/to/project/ is for the original project, not the new one! And when it appears for this case, it is file not found instead of permission denied. (Both files ARE there.)
I have searched all over the net and stack exchange and can't find any other reference to this problem.
I had this same issue. It happened after I deleted a project's files without removing the project from NetBeans first. Not sure why that caused it but that is the only thing I can think of because the theme.res file that "could not be found" was for the project that I had deleted.
For some reason the CN1 designer thinks that your theme.res file is the NetBeans executable.
To fix this, open the designer and click on File -> Setup Netbeans, then find your netbeans executable and select it. For me (on linux) it was
home/user/netbeans-8.1/bin/netbeans

Resources