#npm install --force

58 messages · Page 1 of 1 (latest)

silk waspBOT
#

Project ID: N/A

viral phoenix
#

N/A

hasty jasper
#

add a nixpacks.toml to your project with this in it

[phases.install]
cmds = ['npm install --force']
viral phoenix
#

Cheers, not in the src right?
Like where you add the netlify.toml?

hasty jasper
#

root of the project, yeah

viral phoenix
#

I'll try it, nothing else needed?

hasty jasper
#

nope that should be it

viral phoenix
#

Hmm now it deploys at least, weird though because it doesnt seem to resolve a component which exists... which cuases the deploy to break

hasty jasper
#

care to send the specific error message youre getting?

viral phoenix
#

Not a lot info to base on 😄

hasty jasper
#

make sure the folder and filename casing is the same in github as it is locally

viral phoenix
#

😄

#

well well well....

hasty jasper
#

that would do it

viral phoenix
#

I hope

hasty jasper
#

i assume you dev on windows? windows is not case sensitive

viral phoenix
#

Yes, me and my devPartner been having a fight with this project. We changed the names once of the components and now its a mess. Although he made a new rep yesterday which should be fixed 🙂

#

Can it fail beause of these type of noused?

hasty jasper
#

what kind of app is this?

viral phoenix
#

MERN

hasty jasper
#

I meant specifically what is this you are currently trying to deploy

#

looks like a frontend app? but more specifically?

viral phoenix
#

Frontend fintech kind of

hasty jasper
#

what framework?

#

react? with create react app?

viral phoenix
#

I was setting upp deploy with heroku backend + netlify frontend earlier but wanted to shift towards railway 🙂

#

React indeed.

hasty jasper
#

create react app?

#

vite?

viral phoenix
#

create react app

hasty jasper
#

then two issues here.
you have warnings and they are being treated as errors thus causing your build to fail, you have two options, fix the warnings, or ignore them so they don't cause your build to fail.

second issue we will get to after this.

viral phoenix
#

I will fix the warnings in shortterm and unused variables.

#

just a lot of code to clean up and my buddy will handle that

#

It's been working great to host on local

#

How can i ignore them?

#

When building here?

hasty jasper
#

set a service variable CI to false

#

and the second issue.
from what I can tell, you're trying to run a development server on railway, since create react app is only capable of running a development server

#

simple enough fix, let's tackle that

#

I'm pretty sure you won't need npm install --force since the real issue was that one file named incorrectly from what I can tell

viral phoenix
hasty jasper
#

I think it's a lowercase F

viral phoenix
#

Ofc.

#

I'll leave this to my backend partner, i suck at this stuff

#

now its loop deploying at least

hasty jasper
#

have you copied in the two files I asked you to?

viral phoenix
#

Just the caddyfile, and the nixpacks, dont i have to install anything?

#

caddy ofc.

hasty jasper
#

no, just copy those two files into your project

viral phoenix
#

sure

hasty jasper
#

please copy the Caddyfile to your repo

viral phoenix
#

Oh yea i did add the file, and pushed

hasty jasper
#

and does it work now?