deployment crashes and says 'Error: Cannot find module '/app/index.js''
me again, so my bot worked for like one min but then the deployment stopped working and gave me that error. idk why when it should work fine. https://github.com/st1xkz/jarvis
34 Replies
Project ID:
6173f88e-f2da-469e-94c6-14d7c275c967
You might find these helpful:
- bot not starting and project always errors after building and deploying
- deployment not working when pushing code to GitHub
⚠️ experimental feature
6173f88e-f2da-469e-94c6-14d7c275c967
Yep, as its an issue with your project, I can't help here.
The reason why you may have not gotten a reply is
1. You didn't provide enough information inline such as logs
2. You might wanna share the error you faced
The more you've shown that you attempted a meaningful debugging on your end, usually I see the community engaging.
Ight I’ll do that
This is the full error it gave me
Very likely a package you were using updated and left ya in the lurch.
I followed the djs guide so I don’t think anything should be wrong really
What node version do you use locally?
vs. the one Railway is reporting?
Uhh I think the latest one
Idrk and idk how to check
I’ll check in a bit though
what is your start command ( found at the top fo the build logs )?
i would probbally just add a start script to your package.json tbh
`
node index.js
cool
so add the start thing to your scripts section of your package.json and it shoudlw rok
Is it cuz of this?
that would cause issues yeah
So I would change that to node src/index.js?
yeah if you want
i would say the package.json route is more standard though
Now it’s saying this
And the config.json file is for my bot token
And it’s not in a folder or anything
thats beacuse you need to import it from the right location.
I guess set your start command to be
cd src && node index.js
but thats not idealI thought I did..
GitHub
GitHub - st1xkz/jarvis: A basic Discord bot I made whilst learning ...
A basic Discord bot I made whilst learning JavaScript. - GitHub - st1xkz/jarvis: A basic Discord bot I made whilst learning JavaScript.
no you set it to
node index.js``
i asume locally you cd to the
src dir and
run node index.js`I just changed the start command to
node src/index.js
again im saying it should be
cd src && index.js
if your getting an import issue with node src/index.js
?
oops i miss typed
cd src && node index.js
Still giving same error
how do you run this locally?
Wym
how do you test this locally?
on your pc
I use gitpod
I don’t have anything locally
how do you run this on gitpod?
I still don’t understand what you mean
when you are developing and writing your code. how do you know it runs?
if you dont know if it runs at all i would advise you to get it up and running in your development environment of choice ( gitpod i guess ), then it should be clear how to get it running on railway