Code Monkey home page Code Monkey logo

Comments (7)

elfprince13 avatar elfprince13 commented on June 27, 2024

If I upgrade from v9 to v10 I instead get:

panic: JavaScript error: Failed to execute 'replaceChild' on 'Node': parameter 2 is not of type 'Node'. [recovered]
wasm_exec.js:22 	panic: JavaScript error: Failed to execute 'replaceChild' on 'Node': parameter 2 is not of type 'Node'.

from go-app.

oderwat avatar oderwat commented on June 27, 2024

Well. I guess you need to show us the code for that trivial example.

I currently have no V10 based public project (but we use V10 since months for our products). Maybe try something we published with V9 in the meantime:

I think the only needed change for V10 is using app.NewZeroComponentFactory(&component{})) with the app.RouteX() but there may be other little things to adjust.

from go-app.

elfprince13 avatar elfprince13 commented on June 27, 2024

Well. I guess you need to show us the code for that trivial example.

I currently have no V10 based public project (but we use V10 since months for our products). Maybe try something we published with V9 in the meantime:

* https://github.com/oderwat/go-guess-the-number-app

* https://github.com/metatexx/go-app-todo

* https://github.com/oderwat/go-nats-app

I think the only needed change for V10 is using app.NewZeroComponentFactory(&component{})) with the app.RouteX() but there may be other little things to adjust.

I literally just copy-pasted the examples from the site and renamed the module for a project I'm testing.

I checked out and built your go-guess-the-number-app with no errors, but running app and navigating to localhost:8000 shows a page with a broken image that says:

TypeError: import object field 'gojs' is not an Object

from go-app.

oderwat avatar oderwat commented on June 27, 2024

Let me check https://github.com/oderwat/go-guess-the-number-app .. this is very old and I forgot that I had this there.

from go-app.

elfprince13 avatar elfprince13 commented on June 27, 2024

In case it makes a difference, I'm compiling with go version go1.22.3 darwin/arm64, but not getting any compilation errors, only runtime errors.

from go-app.

oderwat avatar oderwat commented on June 27, 2024

That is the reason for this one error. The gojs changend between the time my code was written and now. This can't easily be captured by the package.

I quickly rewrote my https://github.com/oderwat/go-guess-the-number-app for V10. Use make run and open http://127.0.0.1:8000

Please tell me if it works for you. I may also update the other examples asap.

from go-app.

elfprince13 avatar elfprince13 commented on June 27, 2024

For posterity - it seems the cluster of related issues here is that there are a bunch of files needed to serve the site statically which can only be generated with app.GenerateStaticWebsite. I'll open a fresh issue when I have a better sense of the workflow that I actually want for this.

from go-app.

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.