Hi Thomas! I’m not sure what happened but the live preview now works! I made an additional change to the “grunt-webpack” line from 4.0.0 to 4.0.3 in the package.json file and it seems like it refreshed after 10 min! Not sure if that fixed the issue but it was the only change I made since then.
Hi Amanda, that’s the right fix for your issue! Version 4.0.0 of grunt-webpack did not support Version 5 of Webpack, which is used in the Theme. That was the cause of the errors you saw. They created a patch Version (4.0.3) to allow grunt-webpack to work with Version 5 of Webpack.
I tried to implement a fix for this but was given different directions from Engineering ticket which resulted in console errors for me. Since I had to commit the change I was wondering if there is a way to undo the commit so I can use this fix instead? I’m currently getting console errors and the live preview will not load as a result of changes to the package-lock.json file.
Hi, I am getting an error after implementing this fix:
“Server application unavailable. To use live preview, please ensure you have configured a web server on port 8080 in your CI Config serve command. Please view the console logs for any errors establishing the web server.”
I checked my serve.sh config file and 8080 is set in the CI Config. Can anyone advise an alternative solution to get this Live Preview working?
You will need to remove the line npm install -g serve. I verified that this fixes the Preview issue. A specific version of serve needs to be installed for Preview to run (v13.0.4). The ci/install_deps.sh script already installs this specific version of serve. But, your ci/serve_setup.sh was overriding this behavior and re-installing serve as the latest version, instead of v13.0.4.
#This will use development mode while in the Yext code editor. Set to "false" to test the production build.
serve -l 8080 desktop/ &