devon
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
Ok, full circle and in summary, I now have ALL environments [local, test (on railway), staging (on railway) and prod (on railway)] restored and properly running through a combination of:
* upgrading medusa
* cleaning up the nixpacks as per your suggestions
* clearing the nixpacks cache in Railway with the
NIXPACKS_NO_CACHE
service variable
* doing necessary database migrations (unrelated to this issue, but had to be done)
Of interest, to fix prod I did the least amount of manual stuff. That environment never saw the 'resolution' used to fix the 'mime' issue, I simply upgraded from November codebase to now. Then it presented the 'mime' issue, so I added the NIXPACKS_NO_CACHE
, redeployed and the issue went away and everything deployed perfectly. So that's of interest for anyone presented with a similar future issue, try a pass of that (you can turn it back to default afterwards) for these weird issues presenting on Railway (or any deployment environment) when using Nixpacks. At this point, I'm actually unsure I needed to upgrade Medusa at all, perhaps the nixpacks cache fix on the old codebase would have been enough, but I can't know at this point as I fixed too fast.165 replies
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
Further magic. Have switched back to the default
NIXPACKS_NO_CACHE=false
and lo-and-behold it all still works... Seems this was a 'spider-web-clearing' exercise...165 replies
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
Hah, get this absolute node craziness. Just on a whim, I decided to remove the resolution for
mime
now that it was all working, and guess what? It works both locally and on Railway. Makes no sense at all, but perhaps it 'kicked' it out of a weird dependency funk by just getting it to work once...165 replies
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
It's not directly, it's more that I use Railway to set redirects to https://<domain> then then I have to set up that domain DNS to the proper Railway server, AND get the SSL (https) certificate. All just tasks that come off of the change in Railway.
165 replies
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
Yep it worked! So that dependency thing in my admin build must have been from a cache issue. Is there a good reason to actually keep caches on in Railway? Seems unfortunate if they can mess w dependencies in this way.
165 replies
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
Nice. Trying that to see if I can bring my service back to life. If that doesn't work, I'll just use the 'new' one I just made (that works) and then configure it to use SSL (through DNS) etc. to match my 'old' one then retire it. Not my fave method but it'll work.
165 replies
Railway projects suddenly failing with new "Cannot find type definition file for 'mime'" Error
Hmmm, have just figured out one more 'Railway config' thing I don't understand. I had my nicely working from before Railway instance hooked up to github, and THAT one is failing during build, however I just made a 'fresh' one and it's working. Pointing at the same github branch though. Is there any history / memory / cache at all the Railway github instances hold onto between code deploys? Not sure why the build step would fail on one and succeed on another otherwise..
165 replies