I am working on a project using Local connected to WP Engine and a git repo on top. The first time I create the site in Local and pull the database down, and then add the git repo with git remote add origin it runs smoothly. However, any time I pull from Local after that it breaks Webpack and I get the following when trying to run npm start:
What you’re describing though seems like that isn’t working which means there’s a bug somewhere.
When you pull the site down, are you using the MagicSync viewer to specifically select what files get changed? You can enable the MagicSync viewer from “Preferences > Appearance & Behavior”
I know that having to specifically select what files to move between environments can be tedious, but I want to zero in on the specific place that things are breaking.
Welp, that looks like why Webpack is breaking after pulling – Local is deleting the entire node_modules folder!
I’ll create a bug report for our devs to work on a fix. In the meantime, can you try unchecking that top-level node_modules folder and then pull the site? This will basically tell Local to not delete all those files when pulling the site down.
Let me know if that workaround does what you need it to do!