Discovered @Theme annotation with theme name 'my-theme', but could not find

Hello. I have encountered an error building my vaadin application:
Discovered @Theme annotation with theme name 'my-theme', but could not find the theme directory in the project or available as a jar dependency. Check if you forgot to create the folder under 'C:\Projects\vaadin-app\application\src\main\frontend\themes' or have mistyped the theme or folder name for 'my-theme'. -> [Help 1]
There a folder “my-theme” under frontend dirctory:
image

I don’t understand why there are error. Should I transfer frontend folder to “src/main” ?

You probably also have a frontend folder in src/main. Move the theme there and delete the frontend folder in project root

Check if you forgot to create the folder under ‘C:\Projects\vaadin-app\application\src\main\frontend\themes’

It works, thanks for advice. But why “frontend” folder should not be in the project root?

It has been moved to src/main since Vaadin 24.4 to have a cleaner project structure, also following existing conventions for maven/gradle projects.
See Upgrading Guide | Vaadin Docs for additional information