I am setting up a project with the following structure:
project
project/frontend: HTML and Javascript stuff
project/backend: Scala - this contains build.sbt
I believe the folder structure is the problem. When I have a project without these sub-folders, IntelliJ works well. Now that I have these sub-folders (and open Intellij in the project
super-folder), any run of a Scala worksheet gives me the error of "No module classpath specified". Would you have suggestions for fixing this? I simply don't know what to do to specify a classpath.
IntelliJ version: 2022.1.2, Build #IU-221.5787.30
CodePudding user response:
This was resolved by adjusting the content root for modules:
- Click on "File"->"Project Structure"
- In the Project Structure Modal, click on "Project Settings"->"Modules"
- Adjust the content root, setting it to "backend" (you might have to remove the default content root to do that).
This also fixes a bunch of other issues, e.g. the IDE detecting and linking objects correctly.