Why VS Code contains emphasized items but no error? - reactjs

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.

Related

Yarn tsc shows errors that no longer exist after merge

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).

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.

Codename One plugin uninstalled / reinstalled, still bug with a skin

A user has tried to install a new skin for the simulator and things did not work, see screenshot:
He uninstalled / reinstalled the CodenameOne plugin but the preview remains bugged as indicated on the screenshot above. Is there some hidden config files he should delete elsewhere?
Skins are installed in this directory: C:\Users\UserName\.codenameone, some of them might have been corrupted during addition.
You can try removing all before re-installing CN1 plugin to see if it solves the problem. Particularly the skins with recent Date modified.
This happens if you pick a corrupt skin file, we made several attempts at fixing it which apparently still didn't resolve the issue.
To workaround it in Windows launch the resedit tool and type into find: "JavaSEPort".
Delete everything you find in that search and it should restore you to the default state.

cmd prompt freezes until I hit CTRL+C, then continues as normal

I'm having a weird issue.
I'm trying to set up a project I downloaded. The project is a web application with server components in Node.js and client components in Angular.
When I do things like npm install in command prompt, it just freezes at _, until I hit CTRL+C, when it resumes and everything executes succesfully.
This is really strange. Any ideas why this is happening?
I've had a number of freezes after an npm i that, even if I scorch the node_modules folder & npm cache (rmdir /S /Q node_modules and then npm cache clean --force), can still happen and that don't seem to happen at predictable times.
Here's one possible answer from the nodejs project's github issues pages, edited slightly to match what I see now in Win10:
though note that you don't have to actively highlight anything for it to stop; I think that's a red herring (or the install is "highlighting" something)
This "Randomly" hang issue is causing by CMD when you trying to
highlight inside of CMD. To resolve this issue:
right click title bar
select Defaults
unselect Quick Edit Mode from the Options tab
reopen CMD
I've given that a try with some success. I think the downside is limited to you having have to hit Alt-space, e, k to select text with the mouse like you did before Quick Edit Mode.
The answer from ruffin seems to be correct. I experienced the same thing. The ping display would just stop, and then Ctrl-C would make it resume. Turning off Quick-Edit mode solved the problem. However, I should also add:
I never had this issue until recently (that is, early December, 2020). It just started happening, seemingly out of the blue. I did not recently (or ever, that I recall) turn on Quick Edit mode. Therefore, my guess is that a recent Windows Update has changed the settings making Quick Edit on the default setting.

Composer/Packagist not giving me my latest package

If you go you https://packagist.org/packages/geekality/website and compare it with what you get when you run `composer show geekality/website.
Latest version at packagist at the top is v0.7
Latest version given in command line output is v0.6
Latest version should have been v0.7.1 in both cases
Version >= 0.7 doesn't even show up in the command line
The dev-master version points to v0.5 ??
What is going on here? How do I fix this? If I change my composer.json to target version/tag 0.7.1, which to me clearly exists on both packagist and on GitHub, I get an error message saying the requested package could not be found.
I have tried
Delete vendor folder and re-update
Delete the composer cache
Do the composer update on a different computer
Delete and recreate the package on Packagist
Create and push a new tag (0.7.1 is basically same as 0.7)
Anyone have any idea what's going on?
Update
Seems like this is caused by some issues with Packagist and that nothing is actually wrong on my side (or others who seem to have the same problem).
I "solved" it temporarily by listing the source of problematic repositories manually in composer.json.
The solution in this case was to wait for Packagist to not be broken.
So, if anyone else have this issue and they have checked all their stuff, maybe check twitter or something to see if anyone else are having issues.
It looks like you stuffed up either your tags or moved origin/master back to an earlier version.
It is version v0.5 that still has the origin/master and master tags associated with it which is very odd.
I think you want to just reset master to the lastest commit, however you probably ought to figure out how this happened first, in case there's something even weirder going on.
The way I tag versions is:
Check in and push everything to the remote repository.
Run git tag 1.2.3 on a command line.
Push the tags on the command line git push --tags
I think you may have caused this issue by skipping step 1 and still having uncommitted changes locally. If you can push those commits, that might fix the problem, otherwise you may need to reset the head to the appropriate version.
In Atlassian Sourcetree that can be done by right clicking on the appropriate checkin, otherwise you can do it from the command line with the git reset command:
git reset --soft a4ed43d16ecb20aaa275ee120e073e043190e093
Does not touch the index file nor the working tree at all (but resets
the head to , just like all modes do). This leaves all your
changed files "Changes to be committed", as git status would put it.
That should not delete anything either locally or remotely, but just change where the head is pointing to.

Resources