tidbyt / pixlet

Build apps for pixel-based displays ✨
https://tidbyt.com
Apache License 2.0
756 stars 107 forks source link

Blank screen when running pixlet serve #378

Open theaswanson opened 2 years ago

theaswanson commented 2 years ago

Hey there,

I'm trying to run the example from the README and am getting a blank screen. Looking at the HTTP response, it's only returning the contents of index.html.

In fact, running any example results in a blank screen. Running pixlet render still works.

I'm running Ubuntu 22.04.1 LTS via WSL. I encountered issues mentioned in #377 and built from source. Not encountering this issue on my Mac.

HTTP Response

image

Command output

curl https://raw.githubusercontent.com/tidbyt/pixlet/main/examples/hello_world.star | \
  pixlet serve /dev/stdin
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   119  100   119    0     0    645      0 --:--:-- --:--:-- --:--:--   643
2022/08/25 18:44:11 listening at http://127.0.0.1:8080
pixlet version
Pixlet version: 5282d88a7127408329b549018cadb3d1d41c2209
nbgibson commented 2 years ago

Chiming in to say I've seen and reproduced this on my machine as well.

nbgibson commented 2 years ago

@theaswanson See if the issue is persisting with the binary/code that was released today. I'm able to serve up content as expected with the latest version of the app.

kudos commented 2 years ago

Same problem after building from master on Fedora.

FD- commented 2 years ago

I’ve been seeing a similar problem on macOS when I had forgotten to run the npm commands during a custom build. The problem was fixed for me when I ran them and reran make build.

kudos commented 2 years ago

I totally assumed the Makefile had all I needed, I might PR something to sort that out.

brettohland commented 2 years ago

I have this exact same issue running this in macOS using the default pixlet serve command. I was able to make it work by specifying a different port: pixlet serve -p 8888.

curl https://raw.githubusercontent.com/tidbyt/pixlet/main/examples/hello_world.star | \
  pixlet serve -p 8888 /dev/stdin
dinosaursrarr commented 1 year ago

You need to run npm run build before make build. See https://github.com/tidbyt/pixlet/pull/252.