It shouldn't be the case that the start command is set to run devDependencies. Either those dependencies should be made prod dependencies else start command should be serve -s build and the cross-env and react-scripts start should be moved out of the default start into a dev-start (or similar). I would suggest the latter.
A production build outputs:
The
start
command then fails as bothcross-env
andreact-scripts
have been pruned as they are in devDependencies.A production containerised build and deploy on OpenShift Kubernetes will run with:
It shouldn't be the case that the
start
command is set to run devDependencies. Either those dependencies should be made prod dependencies elsestart
command should beserve -s build
and thecross-env
andreact-scripts start
should be moved out of the defaultstart
into adev-start
(or similar). I would suggest the latter.