Open kitecin opened 4 years ago
yup.. same error.. anything to change?
Found the prob in my end.. The client folder had its own git repo.. so it doesnt get added to the main repo which is linked with heroku.. so I backed up the client folder and deleted the git stuff.. then put it back in this main folder and did a commit.. it added everything and it works now..
Could you explain in detail how to do it, please? thank you buddy
i am too having the same issue trying from mrng to get things but seems like nothing works still trying
Could you explain in detail how to do it, please? thank you buddy
hey.
when u create the react app , it comes with a .git folder and it is initialized.. so when u git init in the outside folder where both server + client folders are there, the client react folder does not get added to the git. now when u push to the heroku remote , the client folder is not at all pushed.. it is empty..
this was my issue.. dont know if its the same for you guys..
the solution what i did is to take a copy of the client folder and delete it inside this project.. then paste it back in without the git folder.. so this time it will be added to the main git and gets pushed to heroku...
cheers
I just want to share my experience on this too, which is exactly what's written above by alwayskil.
Open up the client directory, not in visual studio but in windows folder, go to view and check show hidden folder, git folder will appear, delete it, cut and paste the entire client folder outside the main directory, then go back to command in visual studio, do the following
After adding and committing without the client folder, cut and paste back the client folder to where it was, and do the following.
As to why this error occurred I don't know, apparently it's got to do with having two git folders in main and client directory, each one gets created but perhaps intrinsically different? The solution seems to be getting rid of the git folder in the sub directory, keep the one in main directory, and do the above steps to make it work.
Coming from this issue I opened as well in Stackoverflow
It works fine in the localhost, but when I try to push it to heroku I have this issue. I was following the Brad Traversy course about MERN but I got this and I can't continue.
This is my package.json
And this is the build error I'm getting.