Kotlin / kotlin-fullstack-sample

Kotlin Full-stack Application Example
https://kotlinlang.org
Apache License 2.0
1.21k stars 169 forks source link

Cannot run sample #37

Open picaron opened 6 years ago

picaron commented 6 years ago

I cloned the repo and ran both services (./gradlew backend:run and ./gradlew frontend:run)

Both servers start successfully but it seems the backend is unable to load the resource : /frontend/frontend.bundle.js

22:26:40.615 [ktor-pool-1-thread-1] TRACE Thinkter - Unhandled: GET - /frontend/frontend.bundle.js
jangalinski commented 6 years ago

I cant run frontend, backend works ...

> Task :frontend:webpack-run
webpack started, see http://localhost:8080/
⚠ 「wds」: The `setup` option is deprecated and will be removed in v3. Please update your config to use `before`
achaiah commented 6 years ago

I can't run the frontend either... so much for a full-stack example :(

* What went wrong:
Execution failed for task ':frontend:npm-preunpack'.
> javax/xml/bind/DatatypeConverter

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
bukajsytlos commented 6 years ago

try run on java 8

On Mon, Apr 2, 2018, 04:37 achaiah notifications@github.com wrote:

I can't run the frontend either... so much for a full-stack example :(

  • What went wrong: Execution failed for task ':frontend:npm-preunpack'.

    javax/xml/bind/DatatypeConverter

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Kotlin/kotlin-fullstack-sample/issues/37#issuecomment-377840433, or mute the thread https://github.com/notifications/unsubscribe-auth/AIOEpQtyalSLDtMLjR8lvwXcwRGVNmOCks5tkY7UgaJpZM4SeDK0 .

achaiah commented 6 years ago

Yes, that worked. Thanks. Apparently the frontend cannot be built with jdk9. To build with jdk8 you can specify the following option: ./gradlew -Dorg.gradle.java.home=your-jdk8-home frontend:run

mformetal commented 6 years ago

That doesn't work for me. Whenever I try to run the sample and connect to http://localhost:8080/, I get this message: "Error occured while trying to proxy to: localhost:8080/".

Para7etamol commented 6 years ago

same procedure and symptoms as inital posting:

08:57:47.724 [ktor-pool-1-thread-4] TRACE Thinkter - 200 OK: GET - / 08:57:47.761 [ktor-pool-1-thread-1] TRACE Thinkter - Unhandled: GET - /frontend/frontend.bundle.js

I used for build and run: java version "1.8.0_131" Java(TM) SE Runtime Environment (build 1.8.0_131-b11) Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

Please help

DavidWhit commented 6 years ago

@picaron same issue here. Man, so much config going on behind the scenes...

picaron commented 6 years ago

not a very convincing example ... 👎

jsvde commented 5 years ago

Had the same problem. The frontend runs on port 8080 and proxies anything that does not match /frontend/ to port 9090 ( the backend). The webpack server does not actually run correctly due to a wrong devDependency babel-core instead of @babel/core. PR #39 aims to fix this but is not merged yet. The "backend issues" described above are the result of the misconfiguration of webpack and can resolved with the same fix.

To solve the problem for now you can just update the single line in frontend/build.gradle from devDependency("babel-core") to devDependency("babel-core") at line 38.

AsimShakour commented 5 years ago

@jsvde Appreciate the suggestion, but I don't see the difference between "frontend/build.gradle from devDependency("babel-core") to devDependency("babel-core") at line 38" .

Thanks

P.S. I get stuck at 80% when I run it on windows: openjdk version "1.8.0_202-release"

ayvazj commented 5 years ago

Should be devDependency("babel-core") to devDependency("@babel/core") at line 38.

21region commented 4 years ago

Should be devDependency("babel-core") to devDependency("@babel/core") at line 38.

This doesn't help. The build still hangs.