onlook
onlook copied to clipboard
[bug] App fails to start, Unexpected token '?'
Some environment specs
Platform: Windows Version: 0.1.46.0 (This was the file version from downloading Windows version from onlook.com)
Describe the bug
I wanted to give this app a try for the first time because it looks awesome! Today, I downloaded it from onlook.com, entered in a prompt, and got stuck with "Waiting for the app to start...". Thankfully, there's a nice terminal view to see what happened:
(I can't copy the text, so here's an image)
Looks like a syntax error on a dependency. Maybe it's some JS bundler error?
Hmm very strange. Looks like a next.js issue...
Could you try either creating a new project or running npm install in the terminal and hit start again?
@Kitenite I tried running npm install. It downloaded a whole bunch of dependencies, but I still get the same exact error when hitting stop and then start again. I also tried creating a new project, and same error.
Hmm, could you take a screenshot of the earlier part of the terminal? I'm wondering where that token came from. Sorry for the trouble
@Kitenite It's a ton of minified Javascript. I would, but I would have to take 30 or so screenshots of it all. I wish I could copy+paste the text, but maybe that could be a feature request for later.
Is your team or whoever tests on Windows unable to replicate? I'm only on Windows because there's no official Linux release.
Justed tested it on Mac and it works wonderfully on version 0.1.48. I updated my Windows version to match my Mac version, and it still doesn't work.
Yeah I'm not able to replicate on Windows but I've seen something slightly similar before. It may have to do with how different node versions deal with installing dependencies. Curious if you run node -v in the Onlook terminal what version that shows.
@Kitenite Okay, got it working by upgrading my Node.js to v22! When I downloaded onlook from the website, I didn't think it would depend on my environment's version of Node.js, and it kinda feels like it shouldn't unless I'm downloading onlook from source. I only figured it did when I saw in the terminal that it was doing a bun.exe run dev, saw that my version of Node was pretty old, and maybe Next.js was bundling the code to a more modern version of javascript.
It may have to do with how different node versions deal with installing dependencies. Curious if you run node -v in the Onlook terminal what version that shows
We were thinking the same thing 😄
You may have given insight to a very insidious bug! Seems like even though we use Bun, it's still checking for the node version in your env and using old dependencies. Gotta debug on if this is a Next.js version or something we can fix in our runtime. Weird!
@Kitenite Wow, how strange! I see what you're saying. I uninstalled Node completely, and it works fine. When I install it back, it seems to be using my environment's Node. Yeah, whatever is making that happen isn't good.
Narrowed this down to an issue with Next.js checking for the system's node version indiscriminately. Opened a ticket for this but I haven't been able to get around this. https://github.com/vercel/next.js/discussions/76071
Closing for desktop version