luckyhandler
luckyhandler

Reputation: 11329

Intellij Idea is not recognizing the dart project correctly since using melos

I upgraded my project to be based on a multi-package architecture a few weeks ago. My primary pubspec.yaml contains path references to those feature or library packages.

To be able to manage this mono-repo I recently introduced melos.

Now I have the problem that I cannot use Intellij any more as it doesn't recognize the project correctly:

What I tried to address this issue so far:

So what else could be the problem for such a behaviour?

Running the project in VS Code works so it is related to Intellij.

Upvotes: 0

Views: 360

Answers (1)

luckyhandler
luckyhandler

Reputation: 11329

I found the issue:

Short answer --> manually delete all your iml files and run melos bs again

Explanation: melos automatically creates iml files which are named like melos_module.iml. Two of my packages still had an old iml file called module.iml. melos clean on the other hand didn't remove all iml files nor did Repair IDE do such a thing. So the problem with the two redundant files was never solved.

After manually removing all iml files in the project and running melos bs again I have a running project again.

Upvotes: 1

Related Questions