Kotlin / full-stack-web-jetbrains-night-sample

Full-stack demo application written with Kotlin MPP
274 stars 55 forks source link

Sample project does not load #10

Open JasperCiti opened 3 years ago

JasperCiti commented 3 years ago

Hi

When I run the sample project from Intellij "Development Run" I get

BUILD SUCCESSFUL in 2m 8s
12 actionable tasks: 10 executed, 2 up-to-date

Waiting for changes to input files of tasks... (ctrl-d then enter to exit)
<i> [webpack-dev-server] [HPM] Proxy created: /  -> http://localhost:8080
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.20:8080/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Projects\full-stack-web-jetbrains-night-sample\client\build\processedResources\js\main' directory
<i> [webpack-dev-middleware] wait until bundle finished: /
<e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:8080/ to http://localhost:8080/ [ENOBUFS] (https://nodejs.org/api/errors.html#errors_common_system_errors)

If I run the same project from the terminal: ./gradlew :client:run -t

> Configure project :client
Project property 'kotlin.parallel.tasks.in.project' is deprecated.
By default it depends on Gradle parallel project execution option value.

> Configure project :shared
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.

> Task :kotlinNpmInstall
warning workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > webpack-dev-server > url > querystring@0.2.0: The querystring API is considered Legacy. new code should use the URLSearchParams API i
nstead.
warning workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > webpack-dev-server > sockjs > uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain ci
rcumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui@4.0.12" has incorrect peer dependency "core-js@>=3.0.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui@4.0.12" has unmet peer dependency "react@>=16.8.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui@4.0.12" has unmet peer dependency "react-dom@>=16.8.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > eslint-plugin-react-hooks@4.2.0" has unmet peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0
.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > extricate-loader@3.0.0" has incorrect peer dependency "webpack@^4.0.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-markdown@5.0.3" has unmet peer dependency "@types/react@>=16".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-markdown@5.0.3" has unmet peer dependency "react@>=16".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-movable@2.5.4" has unmet peer dependency "react@^16.3.0-0 || ^17.0.0-0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-movable@2.5.4" has unmet peer dependency "react-dom@^16.3.0-0 || ^17.0.0-0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-virtualized@9.22.3" has unmet peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-virtualized@9.22.3" has unmet peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-waypoint@10.1.0" has unmet peer dependency "react@^15.3.0 || ^16.0.0 || ^17.0.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > @jetbrains/ring-ui > react-markdown > html-to-react@1.4.5" has unmet peer dependency "react@^16.0 || ^17.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > kotlin-wrappers-kotlin-react-dom-js-ir > react-dom@17.0.2" has unmet peer dependency "react@17.0.2".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > kotlin-wrappers-kotlin-styled-js-ir > styled-components@5.3.0" has unmet peer dependency "react@>= 16.8.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > kotlin-wrappers-kotlin-styled-js-ir > styled-components@5.3.0" has unmet peer dependency "react-dom@>= 16.8.0".
warning "workspace-aggregator-5416cb96-b9ab-4461-8193-238c285a81fe > kotlin-full-stack-application-demo-client > kotlin-wrappers-kotlin-styled-js-ir > styled-components@5.3.0" has unmet peer dependency "react-is@>= 16.8.0".

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 14s
12 actionable tasks: 6 executed, 6 up-to-date

Waiting for changes to input files of tasks... (ctrl-d then enter to exit)
<i> [webpack-dev-server] [HPM] Proxy created: /  -> http://localhost:8080
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.0.20:8080/
<i> [webpack-dev-server] Content not from webpack is served from 'C:\Projects\full-stack-web-jetbrains-night-sample\client\build\processedResources\js\main' directory
<i> [webpack-dev-middleware] wait until bundle finished: /
<e> [webpack-dev-server] [HPM] Error occurred while proxying request localhost:8080/ to http://localhost:8080/ [EADDRINUSE] (https://nodejs.org/api/errors.html#errors_common_system_errors)
<-------------> 0% WAITING
> IDLE
> IDLE

And then it gets stuck at 0%

However the production version works: ./gradlew :server:run

erdemtuna commented 3 years ago

I have the exact same issue.

Oberdiah commented 3 years ago

Same issue here Edit: I don't get the final line [HPM] Error occurred while proxying request localhost:8080/ to http://localhost:8080/ [EADDRINUSE] (https://nodejs.org/api/errors.html#errors_common_system_errors) but it breaks in a similar way I have posted a separate issue.

ilgonmic commented 3 years ago

Firstly, you need to run application server once, because since Webpack 5 was released, previous scheme with Webpack starting application server doesn't work anymore. And then you can work with development mode with auto reload. We need update docs here. Thanks

Oberdiah commented 3 years ago

Ok, that's working great :) Is there any way to auto reload the server in a similar way to the client, or is that not possible? When I run the server ktor gives the warning No ktor.deployment.watch patterns match classpath entries, automatic reload is not active