React vinxi app failing build
Hi there, for some reason my build is failing for my vinxi app
here are the build logs:
90 Replies
Project ID:
047d91cb-fd36-4784-9efc-af0c5dbe5158,047d91cb-fd36-4784-9efc-af0c5dbe5158,047d91cb-fd36-4784-9efc-af0c5dbe5158
Project ID:
f78d75b5-8972-4d61-8517-22bbccefb41e
full build logs please - https://bookmarklets.up.railway.app/log-downloader/
@Brody
so what is vinxi?
it's a js builder https://vinxi.vercel.app/
Vinxi
Vinxi Documentation
so it's used by tanstack
interesting
haven't seen anyone ask for help to deploy it
yeah is that the problem?
but I see two issues, you aren't specifying the correct pnpm version, and you are attempting to run a development server
after committing on that other thread I'd thought you'd be a little more conscious on running things that use a lot of unnecessary memory 😆
🤣
I didn't want to write a backend server for my react app so was trying this app with server functions
SSR?
Server Functions | TanStack Router React Docs
As TanStack Start is a full-stack framework, we need a way to call a function on the client which then executes some code on the server.
This is where Server Functions come in.
can you link to an example project that's most like what your own project is?
here you go!
https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-basic-counter?file=README.md
StackBlitz
Router Start Basic Counter Example - StackBlitz
Run official live example code for Router Start Basic Counter, created by Tanstack on StackBlitz
thanks, I'll see about getting that properly deployed on railway
Cool thanks, if it's too much dw about it i can always work on the traditional react way
I'm sure it won't be too much
it doesnt even build lol
Oh wtf
Ah you need to install @vitejs/plugin-react
And dev should run after
I just cloned it to my local
can you build it?
Yeah it builds. Let me make my repo available if that helps
what version of node
22.1
ill try
noted
the reason i was using dev server as the starter was due to the
vinxi start
command still being in experimental
phase and it doesn't really work that welldoesnt seem to build locally, using node 22
This is my repo and it builds fine that's weird
https://github.com/eFnF/linker
GitHub
GitHub - eFnF/linker: An eFnF link shortener tool
An eFnF link shortener tool. Contribute to eFnF/linker development by creating an account on GitHub.
"it works on my machine" lol
I'm using node 22 and pnpm 9.5.0
same
I'm on 22.5.1
im upgrading
im downgrading
nope
yeah not sure, i upgraded and it works. I don't recall making changes on my end
delete your node modules and install again
yeah i did that as well
oh well
what build artifacts does running a build create
it builds these 2 folders
.output
and .vinxi
are there any kind of server.js files or something in the build?
something that starts the actual server and not a development server
i believe it's the
/.output/server/index.mjs
filetry having the start script start that then
kk
yeah it runs
i think thats what
vinxi start
does but i lose all my css etcis vinxi start is anything like vite that still runs a development server
if it's more like next, then it runs a production server
try running the entry then
yeah running that one does not work
well time to find out if vinxi start runs a development server
yeah the docs are not great tbh
CLI | Vinxi
Vinxi Documentation
Starts a production server for your app.good enough for me
GitHub
vinxi/packages/vinxi/bin/cli.mjs at main · nksaraf/vinxi
The Full Stack JavaScript SDK. Contribute to nksaraf/vinxi development by creating an account on GitHub.
have the start command run it
why is the css not loading in?
about to scrap this 🤣
i feel like i'm wasting your time
you're not
but sort that css issue out and then let me know if you have issues running it on railway
yeah it doesn't seem to be loading the js files for tailwind etc
so the build stuff is sorted out?
well not for me, but you can build it, so you need to sort out why the assets aren't loading
bet ty
hey so i figured out the asset loading issue so i reverted the railway settings to just use defaults but it still fails to build the image
perfect, you need to specify the pnpm version -
https://nixpacks.com/docs/providers/node#corepack
nice that did it. now to figure out why it just loops the start command lol
are you on the V2 runtime?
yes
what's the state of the deployment
active, it deployed successfully
open the link?
doesn't work i think since it keeps restarting
do you have a custom domain?
Yeah, I also tried a railway domain and that did not work
are you using cloudflare
edit: yes you aer
The
ERR_TOO_MANY_REDIRECTS
is caused by the TLS mode in cloudflare. Go to the domain you're using (efnf.io) on cloudflare. Then click "SSL/TLS" and set the encryption mode to "Full"how did it not work though
this did it :yeet:
but how did the railway domain not work?
oh i think i messed up i added the railway domain with the custom domain
well all works now?
yep
thanks for all the help 🙏
no problem!
I'm curious, why did the assets not load?
seems to be a vinxi bug, so the workaround is injecting the styles in the document. before i just imported the css file as is
import "../globals.css"
GitHub
CSS Not in Initial Document for Prod Builds (Waterfalls) · Issue #7...
In dev mode, the initial document will render with CSS embedded When running a production build, CSS Modules are split out and fetched after initial document load (causing waterfall) I noticed this...
gotcha