Trying to deploy vanilla TS app, without success

Hi there, I'm trying to deploy vanilla ts app for the first time and im getting stuck on this: "ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 2" tried putting "CI=false" in variables, but it doesnt work my package.json looks like this: "scripts": { "dev": "vite", "start": "tsc --watch", "build": " tsc && vite build", "preview": "vite preview" }, tried removing "tsc" still didn't work, any ideas? project-id: b2dfc4bc-a7c0-4d3a-971c-6b72992d5f02
14 Replies
Percy
Percy12mo ago
Project ID: b2dfc4bc-a7c0-4d3a-971c-6b72992d5f02
BIROALTACC
BIROALTACCOP12mo ago
Brody
Brody12mo ago
set a service variable CI = false https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into yours
BIROALTACC
BIROALTACCOP12mo ago
still the same I got it up myself, thanks anyway!
Brody
Brody12mo ago
@BIROALTACC are you still using my nixpacks.toml and Caddyfile? if you aren't you are very likely running a development server instead
BIROALTACC
BIROALTACCOP12mo ago
I am using that indeed, is that the same as dist?
Brody
Brody12mo ago
dist is the folder that your app is output to when it's built
BIROALTACC
BIROALTACCOP12mo ago
sry, I meant serve
Brody
Brody12mo ago
serve is just a simple single page app static server, so yes its similar in ways, but caddy is far more memory efficient, thus it costs less
BIROALTACC
BIROALTACCOP12mo ago
awesome then
Brody
Brody12mo ago
If you don't mind saying, what did you end up doing to make it work?
BIROALTACC
BIROALTACCOP12mo ago
just cleared all of those errors from ts, even tho they were all basically declaring something and then not using it. I also had to fix not making top level await calls. I just wrapped those into async function and then called them, that fixed the issue
Brody
Brody12mo ago
gotcha, thanks for saying, happy I could provide some help lol
Want results from more Discord servers?
Add your server