pixlet
pixlet copied to clipboard
Blank screen when running pixlet serve
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
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
Chiming in to say I've seen and reproduced this on my machine as well.
@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.
Same problem after building from master on Fedora.
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.
I totally assumed the Makefile had all I needed, I might PR something to sort that out.
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
You need to run npm run build
before make build
. See https://github.com/tidbyt/pixlet/pull/252.