R
Railway13mo 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
Percy13mo ago
Project ID: 152ff848-e90d-48e6-9bfd-f487495da195
arcoz
arcoz13mo ago
152ff848-e90d-48e6-9bfd-f487495da195
arcoz
arcoz13mo 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
Medim13mo ago
It runs fine locally?
arcoz
arcoz13mo 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
Medim13mo 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
arcoz13mo ago
Is work dir
arcoz
arcoz13mo 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
Medim13mo ago
If u remove the Dockerfile and set the start command in the service to npm run start:prod does it work?
arcoz
arcoz13mo ago
I have dependences require node v19 So i don't can run without dockerfile
Medim
Medim13mo ago
You can set a NIXPACKS_NODE_VERSION = 19 env var to set the node version
arcoz
arcoz13mo ago
19 is added of support ?
Medim
Medim13mo 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
arcoz13mo ago
https://discord.com/channels/713503345364697088/1136776022012985504 My last post have say to use dockerfile for fix it
Medim
Medim13mo ago
if brody said it, better keep that dockerfile there
Want results from more Discord servers?
Add your server