vugu-examples / taco-store

Example shopping cart
MIT License
4 stars 2 forks source link

How to run it? #3

Open dyaskur opened 3 years ago

dyaskur commented 3 years ago

I tried to do these steps:

  1. ./build.sh
  2. ./build-wasm.sh
  3. ./bin/server

and returned:

2021/04/25 06:38:05 Starting HTTP Server at "127.0.0.1:8844"
2021/04/25 06:38:14 FrontendHandler starting with dist dir: /Users/yaskur/Sites/go/vugu-example/dist
2021/04/25 06:38:16 go run build-frontend.go - err: <nil>
bradleypeabody commented 3 years ago

If you then browse to http://127.0.0.1:8844/ do you get a page load? If not, what do you get?

martinoverelv commented 3 years ago

Following the same steps as @dyaskur, i get similar output in the shell. The wep page at 127.0.0.1:8844 does not display anything but the loading gif for me.

Picture shows the network tab in chrome dev tools image

bradleypeabody commented 3 years ago

Can you also provide the browser console output? It appears to be loading all the right things into the page, possibly the error is happening in-browser.

martinoverelv commented 3 years ago

image Image shows console output when following said steps. Following the link that leads to where the error occurs displays this output. image

tullo commented 3 years ago

Same here:

Screenshot from 2021-05-03 15-55-11

bradleypeabody commented 3 years ago

wasm_exec.js is returning an empty file which is causing this error.

Copying this file in place with cp /usr/local/go/misc/wasm/wasm_exec.js dist/ (or the Windows equivalent) solves it.

@mertnacakgedigi I don't see any code in here to deal with wasm_exec.js. When you were testing this before did you just copy this file in place manually? The build process should be updated to include finding and copying that file in place, or as a quick fix we should at least document what the user needs to do to fix it manually.

tullo commented 3 years ago

💯 after cp wasm_exec.js to dist and restarting the binary the demo now works.