Gulp watch opens nginx welcome page & Install Dependencies with Composer error when running vagrant up

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.

1 Like

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ā€¦ :sweat: 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.