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
Project ID:
b2dfc4bc-a7c0-4d3a-971c-6b72992d5f02
full build logs please https://bookmarklets.up.railway.app/log-downloader/
set a service variable
CI
= false
https://github.com/brody192/vite-react-template
copy the nixpacks.toml and Caddyfile from this repo into yoursstill the same
I got it up myself, thanks anyway!
@BIROALTACC are you still using my nixpacks.toml and Caddyfile? if you aren't you are very likely running a development server instead
I am using that indeed, is that the same as dist?
dist is the folder that your app is output to when it's built
sry, I meant serve
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
awesome then
If you don't mind saying, what did you end up doing to make it work?
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
gotcha, thanks for saying, happy I could provide some help lol