no such file or directory stat '/app/client/build/index.html'
create a folder with name app and put client folder on it after that you go on your server.js file
add these line of code and change according to your dirctory
if (process.env.NODE_ENV) {
//static folder add
app.use(express.static('app/client/build'));
app.get("*", function (req, res) {
res.sendFile(path.resolve(__dirname , "app/client/build", "index.html"));
});
}
after that you go on your package.json file and change heroku-postbuild to according to the code
"scripts": {
"test": "echo "Error: no test specified" && exit 1",
"start": "node server.js",
"server": "nodemon server.js",
"client": "npm start --prefix client",
"client-install": "npm install --prefix client",
"dev": "concurrently "npm run server" "npm run client"",
"heroku-postbuild": "cd app && cd client && npm install --only=dev && npm install && npm run build",
"full-install": "npm install && npm install --prefix client"
},