React vinxi app failing build

kevmokHOBBY

a year ago

Hi there, for some reason my build is failing for my vinxi app
here are the build logs:

#9 DONE 0.0s



#10 [stage-0  6/10] RUN --mount=type=cache,id=s/047d91cb-fd36-4784-9efc-af0c5dbe5158-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile



#10 0.876WARNIgnoring not compatible lockfile at /app/pnpm-lock.yaml



#10 0.879ERR_PNPM_NO_LOCKFILECannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

#10 0.879

#10 0.879 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

#10 ERROR: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1

-----

> [stage-0  6/10] RUN --mount=type=cache,id=s/047d91cb-fd36-4784-9efc-af0c5dbe5158-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile:

0.876WARNIgnoring not compatible lockfile at /app/pnpm-lock.yaml

0.879ERR_PNPM_NO_LOCKFILECannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

0.879

0.879 Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"

-----





2 warnings found (use --debug to expand):

 - UndefinedVar: Usage of undefined variable '$NIXPACKS_PATH' (line 18)

LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 18)



Dockerfile:20

-------------------

18 |     ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH

19 |     COPY . /app/.

20 | >>> RUN --mount=type=cache,id=s/047d91cb-fd36-4784-9efc-af0c5dbe5158-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile

21 |

22 |     # build phase

-------------------

ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1



Error: Docker build failed

0 Replies

kevmokHOBBY

a year ago

Project ID: f78d75b5-8972-4d61-8517-22bbccefb41e



kevmokHOBBY

a year ago


a year ago

so what is vinxi?


kevmokHOBBY

a year ago

it's a js builder https://vinxi.vercel.app/


kevmokHOBBY

a year ago

so it's used by tanstack


a year ago

interesting


a year ago

haven't seen anyone ask for help to deploy it


kevmokHOBBY

a year ago

yeah is that the problem?


a year ago

but I see two issues, you aren't specifying the correct pnpm version, and you are attempting to run a development server


a year ago

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 😆


kevmokHOBBY

a year ago

🤣


kevmokHOBBY

a year ago

I didn't want to write a backend server for my react app so was trying this app with server functions


a year ago

SSR?



a year ago

can you link to an example project that's most like what your own project is?



a year ago

thanks, I'll see about getting that properly deployed on railway


kevmokHOBBY

a year ago

Cool thanks, if it's too much dw about it i can always work on the traditional react way


a year ago

I'm sure it won't be too much


a year ago

it doesnt even build lol

1266435913634943000


kevmokHOBBY

a year ago

Oh wtf


kevmokHOBBY

a year ago

Ah you need to install @vitejs/plugin-react


kevmokHOBBY

a year ago

And dev should run after


kevmokHOBBY

a year ago

I just cloned it to my local


a year ago

can you build it?


kevmokHOBBY

a year ago

Yeah it builds. Let me make my repo available if that helps


a year ago

what version of node


kevmokHOBBY

a year ago

22.1


kevmokHOBBY

a year ago

1266469969106047000


a year ago

ill try


kevmokHOBBY

a year ago

"scripts": { "dev": "vinxi dev", "build": "vinxi build --preset node-server", "start": "vinxi start",


a year ago

noted


kevmokHOBBY

a year ago

the reason i was using dev server as the starter was due to the vinxi start command still being in experimentalphase and it doesn't really work that well


a year ago

doesnt seem to build locally, using node 22


a year ago

Processed route in 17ms
vite v5.3.5 building SSR bundle for production...
✓ 9 modules transformed.
x Build failed in 64ms

[3:22:30 PM]  ERROR  [tsr-routes-manifest] Could not load tsr:routes-manifest (imported by node_modules/@tanstack/start/dist/esm/router-manifest/index.js): Cannot read properties of undefined (reading 'map')

kevmokHOBBY

a year ago

This is my repo and it builds fine that's weird

https://github.com/eFnF/linker


a year ago

[3:30:39 PM]  ERROR  [tsr-routes-manifest] Could not load tsr:routes-manifest (imported by node_modules/.pnpm/@tanstack+start@1.45.10_@types+node@20.14.12_ioredis@5.4.1_react-dom@18.3.1_react@18.3.1__rea_yl4fwum6lsr4zfzdcqzrmux4by/node_modules/@tanstack/start/dist/esm/router-manifest/index.js): Cannot read properties of undefined (reading 'map') 

kevmokHOBBY

a year ago

"it works on my machine" lol


a year ago

I'm using node 22 and pnpm 9.5.0


kevmokHOBBY

a year ago

same

1266478857553318100


a year ago

I'm on 22.5.1


kevmokHOBBY

a year ago

im upgrading


a year ago

im downgrading


a year ago

nope


kevmokHOBBY

a year ago

yeah not sure, i upgraded and it works. I don't recall making changes on my end


a year ago

delete your node modules and install again


kevmokHOBBY

a year ago

yeah i did that as well


a year ago

oh well


a year ago

what build artifacts does running a build create


kevmokHOBBY

a year ago

it builds these 2 folders .output and .vinxi

1266480598646526000


a year ago

are there any kind of server.js files or something in the build?


a year ago

something that starts the actual server and not a development server


kevmokHOBBY

a year ago

i believe it's the /.output/server/index.mjs file

1266481216253723000
1266481216480088300


a year ago

try having the start script start that then


kevmokHOBBY

a year ago

kk


kevmokHOBBY

a year ago


kevmokHOBBY

a year ago

1266482052828500200


kevmokHOBBY

a year ago

yeah it runs

1266482123670557000


kevmokHOBBY

a year ago

i think thats what vinxi start does but i lose all my css etc


a year ago

is vinxi start is anything like vite that still runs a development server


a year ago

if it's more like next, then it runs a production server


a year ago

try running the entry then


kevmokHOBBY

a year ago

yeah running that one does not work


a year ago

well time to find out if vinxi start runs a development server


kevmokHOBBY

a year ago

yeah the docs are not great tbh


kevmokHOBBY

a year ago

Starts a production server for your app. It looks for your recently built app in the appropriate directory based on the preset. By default, Vinxi uses the node-server preset, and looks for your app in the .output direction. You can change the preset being used using the --preset option or the SERVER_PRESET environment variable.



a year ago

Starts a production server for your app.
good enough for me



a year ago

have the start command run it


kevmokHOBBY

a year ago

1266485667186086000


a year ago

why is the css not loading in?


kevmokHOBBY

a year ago

about to scrap this 🤣


kevmokHOBBY

a year ago

i feel like i'm wasting your time


a year ago

you're not


a year ago

but sort that css issue out and then let me know if you have issues running it on railway


kevmokHOBBY

a year ago

yeah it doesn't seem to be loading the js files for tailwind etc


kevmokHOBBY

a year ago

so the build stuff is sorted out?


a year ago

well not for me, but you can build it, so you need to sort out why the assets aren't loading


kevmokHOBBY

a year ago

bet ty


kevmokHOBBY

a year ago

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


kevmokHOBBY

a year ago


a year ago

perfect, you need to specify the pnpm version -


kevmokHOBBY

a year ago

nice that did it. now to figure out why it just loops the start command lol

1266497468661502000


a year ago

are you on the V2 runtime?


kevmokHOBBY

a year ago

yes


a year ago

what's the state of the deployment


kevmokHOBBY

a year ago

active, it deployed successfully


kevmokHOBBY

a year ago

1266500291298201600


a year ago

open the link?


kevmokHOBBY

a year ago

doesn't work i think since it keeps restarting

1266501582833455000


a year ago

do you have a custom domain?


kevmokHOBBY

a year ago

Yeah, I also tried a railway domain and that did not work


a year ago

are you using cloudflare
edit: yes you aer


a year ago

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"

1266506747959312400


a year ago

how did it not work though


kevmokHOBBY

a year ago

this did it <:yeet:720702431511707660>


a year ago

but how did the railway domain not work?


kevmokHOBBY

a year ago

oh i think i messed up i added the railway domain with the custom domain


a year ago

well all works now?


kevmokHOBBY

a year ago

yep


kevmokHOBBY

a year ago

thanks for all the help 🙏


a year ago

no problem!


a year ago

I'm curious, why did the assets not load?


kevmokHOBBY

a year ago

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"

1266511149537558500



a year ago

gotcha


React vinxi app failing build - Railway Help Station