If you are using version 1.16 of the theme or earlier, you will have issues using live preview due to an outdated dependency for Can I Use (caniuse), which provides browser support tables for front-end web functionality. You’ll recognize this issue if you see something like the following in the Tools > Console log when trying to update preview:
stderr: Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Warning: Task "jambobuild" failed.
It would also appear that your live preview is “broken” and when you refresh the page you’ll see the Yext logo.
To fix this issue, you can either:
- Upgrade to a more recent version of the theme
- Update the gruntfile.js (instructions below)
To fix this without a Theme upgrade, delete the following lines of code in your gruntfile.js
:
if (stderr) {
console.log(`stderr: ${stderr}`);
done(false);
return;
}
Then run Tools > Restart Preview
. That will solve the issue.
Feel free to respond to this post with any questions or comments.