0

some background:this is my first react application and my assumption is build in react is similar to binary files in c++

question : this is for a react application which sole purpose is to run locally. is there anyway we can do npm start only with build

have tried to delete the src folder after building.

expected result is the app should run as usual. actual result : app crashes saying, index.js file is missing

2
  • You need how you config your application Commented Aug 7, 2019 at 6:49
  • So your question is how deployment strategies are done? Commented Aug 7, 2019 at 6:53

1 Answer 1

1

npm start won`t work with build version, you need to install serve and run build using serve locally on your machine

npm install -g serve
serve -s build

ref: https://facebook.github.io/create-react-app/docs/deployment

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.