varabyte / kobweb

A modern framework for full stack web apps in Kotlin, built upon Compose HTML
https://kobweb.varabyte.com
Apache License 2.0
1.6k stars 71 forks source link

Add "trouble shoot frequent beginner's problems setting up Kobweb" section to Readme. #309

Open tscholze opened 1 year ago

tscholze commented 1 year ago

It would be awesome to have a section in the Readme that helps beginners with frequent problems like if you run the command kobweb run and you get the following error and how to fix it.

What went wrong:

Execution failed for task ':site:compileKotlinJvm'.
> Error while evaluating property 'compilerOptions.jvmTarget' of task ':site:compileKotlinJvm'.
   > Failed to calculate the value of property 'jvmTarget'.
      > Unknown Kotlin JVM target: 20

Examples

  1. Check your current java installation using `java --version``
➜  site git:(main) ✗ java --version
openjdk 20.0.2 2023-07-18
OpenJDK Runtime Environment Homebrew (build 20.0.2)
OpenJDK 64-Bit Server VM Homebrew (build 20.0.2, mixed mode, sharing)


**The relevant location:**

- [x] README
- [ ] Code comments
- [ ] Website docs (https://kobweb.varabyte.com)
bitspittle commented 1 year ago

This bug is now a blocker for / a part of #134 (note the troubleshooting section).

Adding a troubleshooting section will be easy. Getting a comprehensive list of what frequent beginners run into may be harder :) But JVM target issues are certainly big ones. (Usually fixing JVM issues involves making sure that your JVM HOME is set up correctly, and that you aren't using anything older than 11 and also avoid using things that are too new, which I think is what is happening in this case. I recommend 11 in general, although apparently Android is forcing people to use 17 so maybe 17 will be the new suggestion)

bitspittle commented 1 year ago

(Also note that the docs will more likely end up existing on the docs site rather than the README, as it will be much easier to update it and link directly to it, vs. something lost in the giant noise of the README)