pixlet icon indicating copy to clipboard operation
pixlet copied to clipboard

Blank screen when running pixlet serve

Open theaswanson opened this issue 2 years ago • 7 comments

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

theaswanson avatar Aug 25 '22 22:08 theaswanson

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

nbgibson avatar Aug 27 '22 18:08 nbgibson

@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.

nbgibson avatar Aug 29 '22 15:08 nbgibson

Same problem after building from master on Fedora.

kudos avatar Aug 30 '22 10:08 kudos

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.

FD- avatar Aug 30 '22 19:08 FD-

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

kudos avatar Aug 31 '22 12:08 kudos

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

brettohland avatar Sep 04 '22 17:09 brettohland

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

dinosaursrarr avatar Feb 04 '23 10:02 dinosaursrarr