Open ghost opened 7 years ago
This is probably an error in your run configuration, or your lein project config has been corrupted somehow. If you check your run configuration, is the correct module specified there? That error is produced when you select a module in your run config which doesn’t contain a registered project.clj
.
I had the same issue after accidentally deleting some configuration files. Things started working again after I right-clicked on project.clj in the Project view and chose "Add as Leiningen project file" (or similar, the option isn't visible anymore so cannot get the actual wording).
@jlemmett Thank you so much for your comment. This error had been a pain in the neck for me for some time as I would have to remove the project and cleanup and then import the project again and all my repl history would be lost.
For me, this error was caused by opening the project through a symlink rather than at the real path. The Leiningen window was showing the project, and clicking the "Add as Leiningen project file" option in the context menu wasn't changing anything, but re-opening the project via a path that didn't include a symlink fixed it.
@cursive-ide - I'm seeing the same problem as @GradySimon. I've got two IntelliJ windows open: one has a library I'm working on ("rapids"), and the other has a project ("pia-server") which symlinks to the library in checkouts. From time to time, though not reliably, the rapids window forgets the Leiningen project file. I usually see the behavior on startup. IntelliJ opens both windows and starts indexing project files. Maybe there's a race condition? Another potential clue about what's going on is how IntelliJ represents the symlinked project in the pia-server window. The project structure is misrepresented. Compare these two screenshots:
Shows correct project structure:
Shows a strange project structure for the rapids library. Notice how the rapids
folder appears as a child of the rapids project, but the src
, dest
and resources
folders appear at top level. These folders also appear inside the rapids subfolder:
I am suddenly getting an error when trying to run:
7/13/17 9:09 PM Compilation completed successfully in 1s 365ms 9:09 PM Error running next-word.prepare-samples: Cannot find leiningen project file
This is for a project that was working fine a week ago. Cursive 1.6.0-2017.1 running under: IntelliJ IDEA 2017.1.5 Build #IU-171.4694.70, built on July 4, 2017. Machine is running MacOS Sierra version 10.12.5.
Thanks!
Jonathan