Package does not exist error when I try to run


This question is regarding Chapter 2 (ReadMe) and 4(Project Setup). I went through the tasks in Chapter 2 with no problems. I even started the application using mvn spring-boot:run, and this was successful (both in command prompt, and also when I navigated to localhost:5000).

In chapter 4, when I installed IntelliJ IDEA, I also moved my mflix folder to a different folder from where it was during chapter 2. I’m not if this is the cause of the issue, but I’m not able to run the from IntelliJ IDEA. I get a bunch of errors saying that the (different) packages don’t exist. Additionally, when I go back to command prompt and run mvn-spring-boot:run, I get BUILD FAILURE that says no plugin found for prefix spring-boot.

I have tried Invalidate Caches/Restart in IntelliJ IDEA, and have also tried closing the project, and overwriting it with a new one, but I still see the same issues.

Could you please help me debug this issue?


UPDATE: I had to add pom.xml as a project in IntelliJ for a bunch of packages to be automatically downloaded. Now mvn spring-boot: run works through command prompt, but trying to run the file through IntelliJ gives the error message “Error: Could not find or load main class mflix.Application Process finished with exit code 1” :frowning:


I cheated a little bit. I deleted the IntelliJ folders, and the mflix folders. Created a new folder, copied the mflix folder from the class’ zip file there. Change the URI to my specific cluster URI.

Opened the pom.xml file in IntelliJ again, Rebuilt the code, and ran it. This time no errors.