Theme 1.16 and below - Update caniuse dependency

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.

2 Likes

Hey Liz! Thanks for this.

Quick q - where can I find the file gruntfile.js ? Perhaps I’m missing it but I can’t seem to find it.

Oops! Nevermind I found it - it is a top level file right beneath the overall config file!

1 Like

Hi! I am getting a similar console error (see screenshot), but am using theme 1.21. Is there an additional fix that needs to be made for the new theme? (cc: @Alyssa_Hubbard )

Thanks!
Sherman