Deployment has crashed

npm WARN config production Use --omit=dev instead.
[email protected] start serve build -n -L -p $PORT
sh: 1: serve: not found this is the error on deploy Logs
Solution:
1. if this is a client side rendered app with client side routing, the correct start command would be serve -s -n -L -p $PORT (assuming the final build is in a folder called build) 2. if this is not a client side rendered app with client side routing, your current start command is good 3. you need to install serve for that just run npm i serve...
Jump to solution
7 Replies
Percy
Percy2y ago
Project ID: 82badddc-6675-4787-a3d2-3998f3438f41
victor.lavado
victor.lavadoOP2y ago
82badddc-6675-4787-a3d2-3998f3438f41
Solution
Brody
Brody2y ago
1. if this is a client side rendered app with client side routing, the correct start command would be serve -s -n -L -p $PORT (assuming the final build is in a folder called build) 2. if this is not a client side rendered app with client side routing, your current start command is good 3. you need to install serve for that just run npm i serve
victor.lavado
victor.lavadoOP2y ago
it works, ty , for some reason serve had disappeared from the package.json
Brody
Brody2y ago
is this a react scripts app?
victor.lavado
victor.lavadoOP2y ago
yep
Brody
Brody2y ago
then you do need the -s flag
Want results from more Discord servers?
Add your server