Cannot deploy Redux
We implemented Redux in our React app and tested locally, then pushed to Railway but the deployment failed with errors related to the new files. We deploy our frontend app often and have not run into other issues, and I'm sure Railway supports Redux, so I'm not sure what's causing this issue.
Service ID: f09aff3f-c562-4252-8e56-05531566765f
20 Replies
Project ID:
f09aff3f-c562-4252-8e56-05531566765f
please share your package.json
thanks for taking a look!
arent you missing redux in your deps?
sorry I may have posted the wrong one. you should see react-redux here.
are your import paths correct? just because it works on your machine doesn't make it a railway specific problem, I'm sure you've seen those memes
yes of course 🙂
ive been deploying many other PRs to railway today. only the redux fails
railway uses node 16 by default perhaps what you doing would require you to be on node 18?
we use 18 locally. just doing the vanilla install of redux. not sure if you've seen others with this issue? we could try to test locally on 16 (though i'd need to check if other things we do require it). is it possible to use 18?
i do have this in my dockerfile: FROM node:18 as build
so i just assumed our railway was on 18 but never checked
oh you are building with a dockerfile?
definitely would have been very useful information to have up front, could you please send it
apologies for that
so I see you have a multistage build, I like that type of optimization, but you should try getting this working with the simplest possible dockerfile and work up from there
it has been working for months. and works with other deployments. only when i add redux does it fail
is something getting .gitignored that shouldn't be
dont think so. i get this error. not using an absolute, just can't find the file
that's a pretty funky looking import path if I'm honest
let me do some digging. can keep you posted
like that might be the correct import path for local development, but you probably need a more platform dependent path
ugh. found the issue. nothing to do with Railway or Redux. just a file not referenced correctly. just figured it was something with Redux since everyhting else worked, and the build wasn't failing locally. apologies.
haha no worries, glad you've solved it