R
Railwayβ€’15mo ago
Reubz

Anyway to check the Package.json in a railway project?

I'm working on a Discord Bot project and I am facing a small issue with file uploads. I had it working properly like about 1 or 2 months ago, few days ago I realize it ain't working anymore. Now that I try to fix it I realize there is no errors when I run the Bot directly off my system. But there is a Error only when running the bot off railway. I have checked that the repository and branch being used for auto-deploy is correct. I have also tried deploying directly from my pc using railway up but still the error continues. As far as my understanding goes the error has something to do with the Packages. Some version mismatch or something like that. Is there something that can be done to check what's wrong with the Railway deployment??
21 Replies
Percy
Percyβ€’15mo ago
Project ID: c3e20774-5cde-495e-be6a-52058cee044b
Reubz
Reubzβ€’15mo ago
c3e20774-5cde-495e-be6a-52058cee044b
luna
lunaβ€’15mo ago
Is this what you're hitting by chance?
TypeError channel.isTextBased/channel.isText is not a function
Reubz
Reubzβ€’15mo ago
if not Package.json any other way to diagnose the issue
Reubz
Reubzβ€’15mo ago
nope
luna
lunaβ€’15mo ago
simply-xp had a commit somewhat recently, was this when it stopped working? πŸ€” https://github.com/Rahuletto/simply-xp/commits/main
Reubz
Reubzβ€’15mo ago
I'm not able to figure out where the error lies because this error doesn't come when run on my pc, the error only comes on Railway Deployment. Which is very weird.
luna
lunaβ€’15mo ago
You're using a lock file correct?
Reubz
Reubzβ€’15mo ago
nope I am running a very old version of simply-xp one of the original versions that I forked
luna
lunaβ€’15mo ago
πŸ€” Whats your package.json look like?
Reubz
Reubzβ€’15mo ago
luna
lunaβ€’15mo ago
unrelated but... why is fs installed as a package? same as why is node added as a package? your package.json says differently... im going to guess the range you have listed there allowed it to update to the new beta i mentioned before.
Reubz
Reubzβ€’15mo ago
I have this same question to myself. This is a very old project that I started back when I was complete newbie. I probably might have seen some tutorial and installed it. I can't be bothered fixing this or updating to new djs version or anything, as long as it works it works type of thing. I am just maintaining this with small fixes here and there thats it
luna
lunaβ€’15mo ago
id say this is likely the issue
Reubz
Reubzβ€’15mo ago
How do I restrict it to the version I want then?
luna
lunaβ€’15mo ago
Remove the ^ at the start.
Reubz
Reubzβ€’15mo ago
ok cool will try this
luna
lunaβ€’15mo ago
youll need to do that and then run npm i to generate a new lock file. actually might need to delete node_modules and then do that.
Reubz
Reubzβ€’15mo ago
cant I just npm uninstall simply-xp and re-download to fix?
luna
lunaβ€’15mo ago
yeah that'll do the same thing basically
Reubz
Reubzβ€’15mo ago
gotcha trying this ayo thanks man removing the ^ fixed it <3