React vinxi app failing build
kevmok
PROOP

2 years 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.876  WARN  Ignoring not compatible lockfile at /app/pnpm-lock.yaml



#10 0.879  ERR_PNPM_NO_LOCKFILE  Cannot 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.876  WARN  Ignoring not compatible lockfile at /app/pnpm-lock.yaml

0.879  ERR_PNPM_NO_LOCKFILE  Cannot 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

108 Replies

kevmok
PROOP

2 years ago

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



kevmok
PROOP

2 years ago


2 years ago

so what is vinxi?


kevmok
PROOP

2 years ago

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


kevmok
PROOP

2 years ago

so it's used by tanstack


2 years ago

interesting


2 years ago

haven't seen anyone ask for help to deploy it


kevmok
PROOP

2 years ago

yeah is that the problem?


2 years ago

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


2 years 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 😆


kevmok
PROOP

2 years ago

🤣


kevmok
PROOP

2 years ago

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


2 years ago

SSR?



2 years ago

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



2 years ago

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


kevmok
PROOP

2 years ago

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


2 years ago

I'm sure it won't be too much


2 years ago

it doesnt even build lol

1266435913634943000


kevmok
PROOP

2 years ago

Oh wtf


kevmok
PROOP

2 years ago

Ah you need to install @vitejs/plugin-react


kevmok
PROOP

2 years ago

And dev should run after


kevmok
PROOP

2 years ago

I just cloned it to my local


2 years ago

can you build it?


kevmok
PROOP

2 years ago

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


2 years ago

what version of node


kevmok
PROOP

2 years ago

22.1


kevmok
PROOP

2 years ago

1266469969106047000


2 years ago

ill try


kevmok
PROOP

2 years ago

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


2 years ago

noted


kevmok
PROOP

2 years 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


2 years ago

doesnt seem to build locally, using node 22


2 years 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')

kevmok
PROOP

2 years ago

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

https://github.com/eFnF/linker


2 years 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') 

kevmok
PROOP

2 years ago

"it works on my machine" lol


2 years ago

I'm using node 22 and pnpm 9.5.0


kevmok
PROOP

2 years ago

same

1266478857553318100


2 years ago

I'm on 22.5.1


kevmok
PROOP

2 years ago

im upgrading


2 years ago

im downgrading


2 years ago

nope


kevmok
PROOP

2 years ago

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


2 years ago

delete your node modules and install again


kevmok
PROOP

2 years ago

yeah i did that as well


2 years ago

oh well


2 years ago

what build artifacts does running a build create


kevmok
PROOP

2 years ago

it builds these 2 folders .output and .vinxi

1266480598646526000


2 years ago

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


2 years ago

something that starts the actual server and not a development server


kevmok
PROOP

2 years ago

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

1266481216253723000
1266481216480088300


2 years ago

try having the start script start that then


kevmok
PROOP

2 years ago

kk


kevmok
PROOP

2 years ago


kevmok
PROOP

2 years ago

1266482052828500200


kevmok
PROOP

2 years ago

yeah it runs

1266482123670557000


kevmok
PROOP

2 years ago

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


2 years ago

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


2 years ago

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


2 years ago

try running the entry then


kevmok
PROOP

2 years ago

yeah running that one does not work


2 years ago

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


kevmok
PROOP

2 years ago

yeah the docs are not great tbh


kevmok
PROOP

2 years 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.



2 years ago

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



2 years ago

have the start command run it


kevmok
PROOP

2 years ago

1266485667186086000


2 years ago

why is the css not loading in?


kevmok
PROOP

2 years ago

about to scrap this 🤣


kevmok
PROOP

2 years ago

i feel like i'm wasting your time


2 years ago

you're not


2 years ago

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


kevmok
PROOP

2 years ago

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


kevmok
PROOP

2 years ago

so the build stuff is sorted out?


2 years ago

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


kevmok
PROOP

2 years ago

bet ty


kevmok
PROOP

2 years 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


kevmok
PROOP

2 years ago


2 years ago

perfect, you need to specify the pnpm version -


kevmok
PROOP

2 years ago

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

1266497468661502000


2 years ago

are you on the V2 runtime?


kevmok
PROOP

2 years ago

yes


2 years ago

what's the state of the deployment


kevmok
PROOP

2 years ago

active, it deployed successfully


kevmok
PROOP

2 years ago

1266500291298201600


2 years ago

open the link?


kevmok
PROOP

2 years ago

doesn't work i think since it keeps restarting

1266501582833455000


2 years ago

do you have a custom domain?


kevmok
PROOP

2 years ago

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


2 years ago

are you using cloudflare
edit: yes you aer


2 years 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


2 years ago

how did it not work though


kevmok
PROOP

2 years ago

this did it <:yeet:720702431511707660>


2 years ago

but how did the railway domain not work?


kevmok
PROOP

2 years ago

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


2 years ago

well all works now?


kevmok
PROOP

2 years ago

yep


kevmok
PROOP

2 years ago

thanks for all the help 🙏


2 years ago

no problem!


2 years ago

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


kevmok
PROOP

2 years 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



2 years ago

gotcha


Loading...