R
Railway

✋|help

Hello, i have a deploy error that i don't have before

Aarcoz9/5/2023
Hello, my last deploy was a year ago, i have make a litle update and now the nodejs projet give my a path error for a file that i don't have touch, i have try to redeploy the deploy before my update but same error, my error :
throw err;

^

Error: Cannot find module '../../index.js'

Require stack:

- /usr/src/app/src/handlers/events/event.ts

- /usr/src/app/src/client.ts

- /usr/src/app/src/index.ts
Aarcoz9/5/2023
MMedim9/5/2023
It runs fine locally?
Aarcoz9/5/2023
Yes
And the old build buildet a moth ago that i have try to rebuild for continue maintain my bot, but crashed to
MMedim9/5/2023
My guess is that theres a problem with u path alias
Look at the path the error generated
/usr/src/app/src/
double src
and in ur tsconfig.json u got a
"$core/*": [ "./src/*" ]
MMedim9/5/2023
If u remove the Dockerfile and set the start command in the service to npm run start:prod does it work?
Aarcoz9/5/2023
I have dependences require node v19
So i don't can run without dockerfile
MMedim9/5/2023
You can set a NIXPACKS_NODE_VERSION = 19
env var
to set the node version
Aarcoz9/5/2023
19 is added of support ?
MMedim9/5/2023
ye (i think)
nvm it doesn't, i thought my app was running on 19 but it runs on 18
I had the same issue you are having, but i can't remember exactly what i did to fix it
Aarcoz9/5/2023
https://discord.com/channels/713503345364697088/1136776022012985504

My last post have say to use dockerfile for fix it
MMedim9/5/2023
if brody said it, better keep that dockerfile there
Aarcoz9/5/2023
But the thing that are cringe, that the same deploy run one moth ago but not now
BBrody9/5/2023
what
I didn't write that dockerfile
Aarcoz9/5/2023
Yes, but you have say my to use a dockerfile
I have write it same, and one moth ago he was work without problem
BBrody9/5/2023
why do you have your lock file in the gitignore
Aarcoz9/6/2023
I use pnpm in dev, and is autogenered gitignore
FROM node:19-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable

COPY . /app
WORKDIR /app

FROM base AS prod-deps
RUN pnpm install --prod --frozen-lockfile

FROM base AS build
RUN pnpm install --frozen-lockfile
RUN pnpx prisma generate
RUN pnpm run build

FROM base
COPY --from=prod-deps /app/node_modules /app/node_modules
COPY --from=build /app/out /app/out
EXPOSE 8000
CMD [ "pnpm", "run", "start:prod" ]


fix, now i use pnpm, swc and build and run, after somes hours to try to run it correctly

Looking for more? Join the community!

Recommended Posts
Issue with setting up custom domainHey guys I have an app hosted on railway. I've added a custom domain and based on the intructions I You have an unpaid invoice. You must pay this invoice before you can upgrade to the Hobby plan.I was trying to pay $20 for the Hobby plan, and then my card was declined, after a few second I got Anyone who has recently deployed a nodejs server on railway willing to help?My server runs fine locally, however when deployed its not listening to the requests. I put in the rIs there a way to auto restart a service to save memory? There an api available that we can trigger?I want to see if there is a way to restart my service in specified durations. if there's an api trigHow to using 3.0.0 dart version?``` #10 [6/9] RUN dart pub get #10 0.566 Resolving dependencies... #10 0.666 The current Dart Using AND in logs Search and fetching these via an APII want to use AND to search the logs with both the keywords, currently the logs search assumes OR whAccessing current Nixpacks fileI need to install Poppler on my Railway environment. From what I can see one way to do this is via tI am having trouble connecting to Azure Data Studio (Postgres)I am trying everything can't seem to connect to ADS any advice? This is the error I'm recieving ``API accusing Application failed to respond in development environmentI'm trying to run my application in the development environment, but it gives an error. It only runsAPI accusing Application failed to respond in development environmentI'm trying to run my application in the development environment, but it gives an error. It only runsRestore old logs?Hi! Is there a way to restore old log feature while you figure out the kinks in the new one? The newSource IPsIm sure I'm missing it in the documentation But is there a list of source IPs from railway deploymeError running the application in the background.I cannot or the screen -S command is not executed in my program, and I do not know what the solutionMedical System To ProductionHello, I am developing a medical system and I want to put it into production using Railway so that eDeploy restarted near the endJust deployed a change (573e8198-6981-45c6-81ae-91d5210afc0c) and it got through the build, then staFiles uploadGood afternoon, I would like to create a small SaaS application and deploy it entirely to railway. Upgrade To Hobby Plan:Why am I unable to upgrade to a Hobby Plan? Your UI keeps getting stuck on this page each time I tryRedis not configured properly for DjangoHi, I'm trying to use Redis with Django and Channels. I keep getting this error message which seems Inspecting built Docker Image locallyHello I have an issue in my application when running in Railway. I would like to download the image Is there someway for me to choose a custom range in the observability?