kotlin-fullstack-sample icon indicating copy to clipboard operation
kotlin-fullstack-sample copied to clipboard

Cannot run sample

Open picaron opened this issue 6 years ago • 12 comments

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

picaron avatar Mar 06 '18 03:03 picaron

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`

jangalinski avatar Mar 21 '18 12:03 jangalinski

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.

achaiah avatar Apr 02 '18 02:04 achaiah

try run on java 8

On Mon, Apr 2, 2018, 04:37 achaiah [email protected] 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 .

bukajsytlos avatar Apr 02 '18 06:04 bukajsytlos

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

achaiah avatar Apr 03 '18 04:04 achaiah

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/".

mformetal avatar Apr 22 '18 13:04 mformetal

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

Para7etamol avatar Jun 12 '18 07:06 Para7etamol

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

DavidWhit avatar Nov 15 '18 04:11 DavidWhit

not a very convincing example ... 👎

picaron avatar Nov 15 '18 14:11 picaron

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.

jsvde avatar Apr 04 '19 15:04 jsvde

@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"

AsimShakour avatar Aug 07 '19 22:08 AsimShakour

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

ayvazj avatar Nov 17 '19 05:11 ayvazj

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

This doesn't help. The build still hangs.

21region avatar Dec 17 '19 10:12 21region