Coder Social home page Coder Social logo

Comments (11)

cfnz avatar cfnz commented on July 17, 2024

Just tried it on the starter app, and have the same problem, so at least it is reproducible...

Will try and spend some time on it today...

from muirwik.

Fellach avatar Fellach commented on July 17, 2024

Same here, I've just downloaded the start app and I'm not able to install deps. I think it is related to just created issue at material-ui repo: mui/material-ui#27172.
My guess is they broke something within version 4.12.0 which was released yesterday.

I found a package.json within a jar file with the section

"dependencies": {
    "@material-ui/core": "^4.11.1",
    "@material-ui/lab": "4.0.0-alpha.56",
    "@material-ui/icons": "^4.9.1"
  },

(defined here)
A better approach would be pointing an exact version of a lib, such as "@material-ui/core": "4.11.1" to avoid auto-updates in the future. The char ^ bumps minor versions automatically. Is it possible to change the deps?

from muirwik.

Fellach avatar Fellach commented on July 17, 2024

one of many warnings from my console:

warning "workspace-aggregator-8e59ff4f-11cb-4ab4-8f98-45785a407aa6 > muirwik-starterapp > muirwik-muirwik-components > @material-ui/core@4.12.1" has unmet peer dependency "react-dom@^16.8.0 || ^17.0.0".

from muirwik.

sentinelweb avatar sentinelweb commented on July 17, 2024

from muirwik.

cfnz avatar cfnz commented on July 17, 2024

@Fellach, thanks, yes, that seems to be the problem, would have taken me a while to find it!

If I pin the Material UI version to 4.11.1 the starter app works, so assume this is the problem.

Will release this as version 0.8.2 shortly.

from muirwik.

cfnz avatar cfnz commented on July 17, 2024

Released version 0.8.2 with Material UI pinned... might take a bit to make it to Maven Central.
Once available, you will need to do a Gradle clean then build and hopefully everything should work (it did for the starter app).

Material UI version 4.11.2 talks about allowing peer dependencies to React 17 which might make some warnings go away... However I have left it pinned to version 4.11.1 as that seems to work for now.

from muirwik.

Fellach avatar Fellach commented on July 17, 2024

Thanks, @cfnz, for lightning fast fix and your work here :)

It works, indeed. Now I can start learning Kotlin

But I've got one more question, unrelated to the bug. How to develop? :D I see there is configured hmr but nothing happens when a file is changing. I've tried with a few gradle commands but maybe haven't found the right one

from muirwik.

sentinelweb avatar sentinelweb commented on July 17, 2024

have you seen this tutorial? I worked through most of them to learn multiplatform only took a few days and they are good examples. This is the react one: https://play.kotlinlang.org/hands-on/Building%20Web%20Applications%20with%20React%20and%20Kotlin%20JS/01_Introduction

and the full set is here: https://play.kotlinlang.org/hands-on/overview

from muirwik.

sentinelweb avatar sentinelweb commented on July 17, 2024

Also many Thanks, @cfnz, that really was a lightning fast fix!

from muirwik.

cfnz avatar cfnz commented on July 17, 2024

Thanks for that, and again also thanks to @Fellach for spotting the Material UI version issue.

In terms of answering @Fellach about how to develop, I usually run with the gradle continuous flag. Using this and the Legacy compiler (because the newer IR compiler does not yet support incremental compilation) you get reasonable change/save and browser refresh times, not as quick as using straight javascript, but not too bad.

You can add --continuous to the gradle command line used to start the app, or add it in the IDE... I use IntelliJ, so in the edit Run/Debug Configurations dialog for the browserDevelopmentRun task, I add in --continuous to the Arguments field... it is not so obvious, but these are the arguments passed to gradle.

Also, @Fellach mentioned learning Kotlin, one new area of development that looks interesting, which might direct you away from this Muirwik and React stuff, is Kotlin Compose for the web (and desktop)... still early days, but looks interesting (I still need to check it out properly)... might be the future of Kotlin web development... just thought I would mention it, not to put you off Muirwik, but Compose for the web was not around when I started it, and as mentioned, it might be the future of Kotlin web development :-) (especially since Jetbrains seems to be behind it).

from muirwik.

Fellach avatar Fellach commented on July 17, 2024

Hi guys, thanks for your input.

Yes, I was aware of --continuous argument but I thought the HMR in Kotlin is working the same way as in JS world, i.e. keeps a state of app and swaps only one module which makes the development really fast. But I guess that not the case here in Kotlin. The compilation and refresh time takes forever if you used to work with Node tools :)

Thanks for the Kotlin Compose link - interesting, worth checking. It seems that's an Android Jetpack for the web.

from muirwik.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.