R
Railway10mo ago
arcoz

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

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
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
20 Replies
Percy
Percy10mo ago
Project ID: 152ff848-e90d-48e6-9bfd-f487495da195
arcoz
arcoz10mo ago
152ff848-e90d-48e6-9bfd-f487495da195
arcoz
arcoz10mo ago
GitHub
Comparing master@{1day}...master · Arcoz0308/BSE-bot
Le bot discord de BSE. Contribute to Arcoz0308/BSE-bot development by creating an account on GitHub.
Medim
Medim10mo ago
It runs fine locally?
arcoz
arcoz10mo ago
Yes And the old build buildet a moth ago that i have try to rebuild for continue maintain my bot, but crashed to
Medim
Medim10mo ago
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/*" ]
arcoz
arcoz10mo ago
Is work dir
arcoz
arcoz10mo ago
GitHub
BSE-bot/Dockerfile at master · Arcoz0308/BSE-bot
Le bot discord de BSE. Contribute to Arcoz0308/BSE-bot development by creating an account on GitHub.
Medim
Medim10mo ago
If u remove the Dockerfile and set the start command in the service to npm run start:prod does it work?
arcoz
arcoz10mo ago
I have dependences require node v19 So i don't can run without dockerfile
Medim
Medim10mo ago
You can set a NIXPACKS_NODE_VERSION = 19 env var to set the node version
arcoz
arcoz10mo ago
19 is added of support ?
Medim
Medim10mo ago
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
arcoz
arcoz10mo ago
https://discord.com/channels/713503345364697088/1136776022012985504 My last post have say to use dockerfile for fix it
Medim
Medim10mo ago
if brody said it, better keep that dockerfile there
arcoz
arcoz10mo ago
But the thing that are cringe, that the same deploy run one moth ago but not now
Brody
Brody10mo ago
what I didn't write that dockerfile
arcoz
arcoz10mo ago
Yes, but you have say my to use a dockerfile I have write it same, and one moth ago he was work without problem
Brody
Brody10mo ago
why do you have your lock file in the gitignore
arcoz
arcoz10mo ago
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" ]
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
Want results from more Discord servers?
Add your server
More 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 runs