yosoyubik / canvas

Peer-to-peer paint app for Urbit
MIT License
142 stars 9 forks source link

Can't `|start %canvas` #23

Closed johnhyde closed 2 years ago

johnhyde commented 2 years ago

I did the following:

yosoyubik commented 2 years ago

Are you on master? I have a branch (that's the one deployed on my moon) that is set up for software distribution:

https://github.com/yosoyubik/canvas/tree/distro

Your instructions should work for getting the backend running. Then you can go to http://localhost:8080/~debug and log in—you need a cookie for developing the UI.

Then go to /ui and npm i && npm run dev.

This is going to serve the frontend on http://localhost:3000/app/canvas—it's proxying all the calls to the backend to port 8080 on your urbit.

I think that's all you need to get it to work, let me know if run into any problems and thanks for trying it out! :)

johnhyde commented 2 years ago

When I try checking out distro and committing that to my desk, I get:

> |commit %canvas
>=
crud: %into event failed
[%poke %into]
bar-stack=~[~[//sync/0vt.r49vl]]
call: failed
/sys/vane/clay/hoon:<[4.344 3].[4.585 5]>
/sys/vane/clay/hoon:<[4.346 3].[4.585 5]>
/sys/vane/clay/hoon:<[4.350 3].[4.585 5]>
/sys/vane/clay/hoon:<[4.353 3].[4.585 5]>
/sys/vane/clay/hoon:<[4.431 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.432 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.433 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.435 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.439 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.440 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.442 5].[4.445 15]>
/sys/vane/clay/hoon:<[4.443 7].[4.444 44]>
/sys/vane/clay/hoon:<[4.444 7].[4.444 44]>
/sys/vane/clay/hoon:<[4.444 12].[4.444 44]>
/sys/vane/clay/hoon:<[1.504 5].[1.521 47]>
/sys/vane/clay/hoon:<[1.507 5].[1.521 47]>
/sys/vane/clay/hoon:<[1.517 5].[1.521 47]>
/sys/vane/clay/hoon:<[1.521 5].[1.521 47]>
/sys/vane/clay/hoon:<[1.478 5].[1.498 26]>
/sys/vane/clay/hoon:<[1.479 5].[1.498 26]>
/sys/vane/clay/hoon:<[1.485 5].[1.498 26]>
/sys/vane/clay/hoon:<[1.486 5].[1.498 26]>
/sys/vane/clay/hoon:<[1.497 5].[1.498 26]>
/sys/vane/clay/hoon:<[1.498 5].[1.498 26]>
/sys/vane/clay/hoon:<[1.535 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.536 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.539 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.546 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.547 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.550 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.554 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.556 5].[1.624 20]>
[ from=2
  deletes={}
    changes
  { [i=~.app t=/canvas/hoon]
    [i=~.desk t=/bill]
    [i=~.lib t=/canvas-templates/hoon]
    [i=~.desk t=/docket-0]
    [i=~.sur t=/canvas/hoon]
    [i=~.mar t=/canvas/diff/hoon]
    [i=~.lib t=/canvas/hoon]
  }
]
/sys/vane/clay/hoon:<[1.562 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.563 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.566 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.567 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.568 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.572 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.575 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.576 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.578 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.580 5].[1.624 20]>
/sys/vane/clay/hoon:<[1.580 40].[1.580 71]>
/sys/vane/clay/hoon:<[1.906 7].[1.925 64]>
/sys/vane/clay/hoon:<[1.907 7].[1.925 64]>
/sys/vane/clay/hoon:<[1.911 7].[1.925 64]>
/sys/vane/clay/hoon:<[1.912 7].[1.925 64]>
/sys/vane/clay/hoon:<[1.913 7].[1.925 64]>
/sys/vane/clay/hoon:<[1.915 9].[1.916 49]>
/sys/vane/clay/hoon:<[1.916 9].[1.916 49]>
[%error-validating /desk/docket-0]
[%validate-page-fail /desk/docket-0 %from %mime]
[%error-building-tube %mime %docket-0]
[%error-building-cast %mime %docket-0]
clay: no files match /mar/docket-0/hoon

and I have no idea what to make of that.

If I stick with master, running npm run dev and visiting http://localhost:3000/apps/canvas gives me, image which is something, I guess. Should I assume that I need to get the distro branch working to develop on the ui?

Edit: If I actually use the right url 🤦‍♂️, I get a better situation, although there's still an error:

TypeError: Cannot read property 'default' of null
    at eval (/src/components/Header.svelte:38:61)

Edit #2: Actually, after deleting desk.docket-0, I can commit the desk from distro, but I still get the 404 error on the frontend, even at the correct URL.

yosoyubik commented 2 years ago

It looks like the docket-0 mark is missing—the repo here has only the files that relate to canvas, but no the whole thing, which is something I should probably fix before I merge to master. In the distro guide you have the steps for getting a minimal desk with the necessary files prior to putting all the canvas files (the part about ./symbolic-merge.sh will set everything up)

https://urbit.org/docs/userspace/dist/guide#create-desk

johnhyde commented 2 years ago

Sounds like Urbit needs a package dev-desk management system. Once I figured out I needed to run |install our %canvas, things improved dramatically. I'll include it in my README updates.