IntelliJ Cannot Copy Error - intellij-idea

I am having an issue with IntelliJ, where it presents a modal popup saying
Error
Canot copy sourcedir/somejar to destination/somejar. Reason sourcedir/somejar (No such file or directory)
However when I do a ls sourcedir/somejar, I can find it.

Cleaning your IntelliJ system cache may solve your problem.
Go to File -> Invalidate Caches...
Then click Invalidate and Restart.
From their website:
"...the only way to solve some conflicts is to clean out the cache..."
Cleaning out the system caches causes a complete rebuild of all the projects ever run in the current version of IntelliJ IDEA.

Related

Do not detect changes while runing project

I add changes to my java project in Intelij IDEA and run project. Application is running with no changes. If I want run app with changes I must rebuild project before every run and it is annoing.
I try:
VCS -> Refresh File Status
File -> Synchronize
File -> Invalidate Caches/Restart
All actions do not help. Any idea?
SOLVED
There was problem in Intellij IDEA cache. I deleted .idea cache folder, next imported project and it is working now.

GoTo in IntelliJ IDEA does not work

I'm developing some js projects (react.js) in IntelliJ IDEA, have many modules linked with export/import, all placed in a tree of folders that is open in my project
anyway, none of IntelliJ's GoTo features work...
can you tell me how to configure quick navigation through function declarations between modules and modules?
Usually this is a sign that the caches/indexes for the project are corrupt. Go to File > Invalidate Caches / Restart and select "Invalidate and Restart". After Restarting, wait for IDEA to re-index the project, and then give it a try, Note that invalidating caches will delete your local history (in the event you use that).

PhpStorm doesn't match any file I try to find

When I press Ctrl+Shift+N (Go to File) and start to find any file, I don't get any results. I tried to delete the .idea folder, and unfortunately no luck. Do you have any suggestions how to fix this? my PhpStorm version is 10.0.0.1.
Update - I tried to open another project, and It still didn't work.
Well I don't know exactly what caused this problem, but when I tried to invalidate the cache and restart, it did the work. (File -> Invalidate Caches -> Invalidate and Restart)

Intellij IDEA 14: Error Loading Project: Cannot load module cars-service

With my last restart of my mac I had a problem with IntelliJ IDEA project : the .iml file was deleted and I have
Error loading project: cannot load module cars-service Details ....
in the console.
Besides that, the structure view of the project has disapeared.
Here is a screenshot:
Finally, I imported my project via import project so the iml file was recreated.
Closing intelliJ. Deleting the .idea folder and re-opening intellij worked for me.
This happened to me this morning*, and fortunately there's a fairly straightforward solution.
Press Ctrl+Alt+Shift+S (or go to File > Project Structure...) and click Modules on the left of the window.
Click the green + above the list of modules then New Module. Select the type of module (Java, Android, Flash, what have you) and click Next.
Enter the details of the lost module. Click the browse button to the right of Content Root and navigate to the directory that contains your lost module. The module name will be populated with the directory name by default, but you can rename it without issue.
(*I... got a bit gung-ho with the old git clean -fd. I don't recommend it.)
The error has nothing to do with gems. Please try deleting the .idea directory and using "Open Directory" on the same directory again to recreate it.-- Dmitry Jemerov
↑an answer on intellij-support.jetbrains.com
This helped me. I just closed Pycharm, then delete .idea directory , then I open Pycharm again, and the error disappeared.
Please try File -> Invalidate Caches / Restart ...
Had a similar issue with PHPStorm (which is also idea based), caused by a renaming of my project. Solution was simple: I just needed to remove the corresponding line for the module declaration in file <project-directory>/.idea/modules.xml. Re-opening the project was not needed as it seemed to me, but I did it anyway.
Have had this issue with PHPStorm 2017.1.3.
IML file is necessary to load the project.
Locate the folder the .iml file used to be in > right click > Local history > show history.From there you should be able to restore that iml file
you can fix it by select your pom file. right click and then reimport

All IntelliJ run configurations disappeared

After IntelliJ IDEA froze and was killed from the task manager, all the Run/Debug Configurations disappeared. I have tried invalidating caches, reloading files from disk, synchronizing and restarting, but nothing helped.
You can try to restore your Run configuration using the Local History feature of IntelliJ IDEA.
If you are using .idea directory based format, then your configurations will reside in workspace.xml file under .idea directory, invoke Local History dialog from the .idea directory right click menu in IDEA Project View, select the label some time before the crash and revert the old copy of workspace.xml.
In case .ipr file based format is used, your configurations will be stored in the <project>.iws file in the project root which you can restore in a similar way.
If the configurations were Shared, they are stored in .idea\runConfigurations directory as separate XML files or in the <project>.ipr file (if old project format is used).
If the Local history is blank and you are in Windows, try Restore previous versions right clicking the workspace.xml file or the <project>.iws one in Windows Explorer.
You can go to your main project and right click on it, select local history --> show history. Find some point in time where you think that system was stable (before crash) and click revert. This worked for me.
To me, this frequently happened on switching branches. Turning off "restore workspace on branch switching" helps to prevent the run configurations from getting lost.
Edit: Not sure if it actually has an impact, it still seems to happen to me sometimes, maybe less frequently though. I'll leave it here since the answer already has some upvotes, so maybe this was the solution for someone...
For every project in intellij there's a file created with all the configurations related to it.
Under the root directory of the project there's a hidden folder .idea in it is the workspace.xml with the configuration. workspace.xml is comprised of components one of which is responsible to hold the run/debug configurations.
If this file is getting corrupted it's difficult to restore these configurations if you don't have a backup of workspace.xml. to overcome it:
1. in intellij right click the workspace.xml file under project view and choose Local History -> Show History
2. if there's no history you can copy the component from a coworker with similar configurations.
3. backup in advance the workspace.xml and retrieve the RunManager component from it..
another good choice is to use the share option.
under each project's definition there's a checkbox share
Marking this checkbox will extract the definition for this project to an external location:
under the same .idea folder a new folder is being created runConfigurations and the configurations per project are being represented there in xml files.
The advantage of using share is that it can be copied and used for similar projects under other branched like QA and production
In my case, i've accidentally pressed Alt + Home and this bar disappeared, this combination toggles run bar at the top of IDEA window for me.
Here the screen with my bound actions on this keys. I hope it should help
Run configurations are stored in your project files. When IntelliJ (or your computer with IntelliJ running) crashes hard, the project files can become corrupted and unreadable. I don't know of a way to recover this unless you have your project files are backed up somewhere.
Navigate to your project folder and check weather any .idea folder is created or not,
if created copy your project and paste it other location ant try opening it;
it will work.
I sometimes have the problem that all the run/debug configurations are not created from CMake after being lost. I solved this by just deleting the whone list of configurations from the workspace.xml (from .idea folder).
This happened to me recently and I just restarted IntelliJ and they shared ones (in .run) are now restored.
In my case what happened was I did something that made IntelliJ recognize the project as a new application type, so it thought my old configuration was not valid for my project anymore and wasn't displaying it to me. I reverted my changes and the configuration appeared as an option again.
I guess this feature can't be removed from IntelliJ but I guess this can help:
Run/Debug configuration functionality might be hidden, so to show it go to:
View/Appearance/Navigation Bar
Very annoying problem in Intellij Idea for many years.
It's quite often breaks because of broken (connection to?) Ant debugger, used to create run configs.
I was periodically searching for a solution, but no success. Then today after disappeared Run Config to display in panel I did inspect contents of workspace.xml. All the run configs were there.
And then it turns out to be 7+ years bug clue...
Always spring out non-called Ant...
Happily, contents of workspace.xml in place with all your run config items, you can just
disable infamous plugin Ant debugger,
reload the project,
and all your run configs are displayed and available again))).
Happy to share with all of you the solution).