I had a personal project set up and had to do a system restore on my Mac and ended up restoring back to my origin Time Machine checkpoint. I went to go work on a project and ran āgulp watchā and was faced with a 404 page. I ran ānpm installā, āvagrant upā, and made sure everything was still in place but still no luck? Wondering what other things I might need to check up on to get this project up and going again. Havenāt messed with this configuration in over a year so Iām a little rusty. Thanks.
Strange, did you check your manifest.json at the bottom to see what link gulp watch is proxying? And try to load that link it directly? If you also get a 404 itās probably WP related rather then Sage/gulp. So the next thing would be to probably check the WP backend for which page it is loading as front page etc. Maybe itās missing some templates now?
Also to reset some things you can delete the node_modules folder, run npm install
, bower install
, first gulp
and then gulp watch
to āclean things upā.
But as said 404 seems to be WP related and not really Sage/gulp.
Yea theyāre both proxying the same link and I get the same 404 when trying to load that link. I went ahead and tried deleting node_modules and reinstalling but still no luck.
Iām wondering if it has something to do with my VM? I think youāre right though, doesnāt seem like a Sage/gulp issue. Iād really appreciate it if anyone can point me in the right direction for fixing VM or WP issues because I have no idea what Iām looking forā¦ Iām trying to figure out what settings or folders or something could be wiped out when reverting to a previous Time Machine checkpoint. I even made sure to commit everything to Git right before doing the revert.
I ran vagrant provision
and got this:
Composer could not find a composer.json file in /srv/www/corey.dev/current To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Have to leave for work now, but at least Iām getting some sort of error I can look into later.
I found this online https://imagewize.com/web-development/roots-trellis-errors/.
Is running vagrant destroy
& vagrant up
a common solution to problems. Sorry for the newb-ish question, just donāt want to dig myself into a deeper hole. It just sounds like itās destroying my current VM and rebuilding it, right?
Iām going to try this along with a nginx restart if necessary.
Tried vagrant destroy
and vagrant up
and was faced with an error at the āInstall Dependencies with Composerā step. When i run gulp watch on my theme Iām taken to the nginx welcome page. Going to my devUrl brings me to the same place too. I ran composer.phar install on my theme to make sure composer was still installed and it attempted to update without any errors, not sure where to go from here?
What error?
The server didnāt finish provisioning successfully.
Try re-provisioning the box and note any errors.
Thanks, I ran composer.phar require roots/soil 3.5.0
in my themes directory and did another vagrant destroy
and a vagrant provision
followed by vagrant up
FWIW you should be requiring Soil at the Bedrock root level with the composer.json
file there, not the themes directory.
Also, after a vagrant destroy
you donāt need to do vagrant provision
, you can just do vagrant up
since it runs the provisioning during the first up
.
Sorry, not sure why I wrote themes dir. It was my site directory.