Console Errors (answers.min.js file) and Blank Preview

Hi,

I just started a build using the new theme 1.19 with sdk version 1.7. “Create Preview” generated a search bar but no vertical pages or content. The console details errors related to “js.answers-locationbias” and an error in the answers.min.js file but I have searched through most of the pages in the Code Editor and cannot find where this is (my guess somewhere in the theme files).

I’ve made relatively few changes, but please see the error messages below.

Console:
Command failed: npx jambo build
unknown: Unexpected token (331:14)
329 | {
330 | pin:

331 | }));
| ^
332 | }
333 | ANSWERS.addComponent(“LocationBias”, Object.assign({}, {
334 | container: “.js-answersLocationBias”,
SyntaxError: unknown: Unexpected token (331:14)
329 | {
330 | pin:
331 | }));
| ^
332 | }
333 | ANSWERS.addComponent(“LocationBias”, Object.assign({}, {
334 | container: “.js-answersLocationBias”,
at Parser._raise (/repo/node_modules/@babel/parser/lib/index.js:757:17)
at Parser.raiseWithData (/repo/node_modules/@babel/parser/lib/index.js:750:17)
at Parser.raise (/repo/node_modules/@babel/parser/lib/index.js:744:17)
at Parser.unexpected (/repo/node_modules/@babel/parser/lib/index.js:8834:16)
at Parser.parseExprAtom (/repo/node_modules/@babel/parser/lib/index.js:10169:20)
at Parser.parseExprSubscripts (/repo/node_modules/@babel/parser/lib/index.js:9688:23)
at Parser.parseMaybeUnary (/repo/node_modules/@babel/parser/lib/index.js:9668:21)
at Parser.parseExprOps (/repo/node_modules/@babel/parser/lib/index.js:9538:23)
at Parser.parseMaybeConditional (/repo/node_modules/@babel/parser/lib/index.js:9511:23)
at Parser.parseMaybeAssign (/repo/node_modules/@babel/parser/lib/index.js:9466:21)
Warning: Task “jambobuild” failed.

Thanks!

Hi Adrienne,

Welcome to the community! There are two areas you’ll have to update for your initial site setup:

  1. The live preview console error Error: label is a required configuration option for tab means a [vertical].json file is missing the verticalKey, which is required for the pages to display correctly. In this case it’s the restaurants.json file.
  2. The other errors are coming from the global_config.json file, which has an invalid experienceVersion. This can be set as either “STAGING” or “PRODUCTION.” However, by default you can leave apiKey, experienceVersion, and businessId commented out since these will automatically pull into the experience.

You can read more about the Global Settings & Locale Configuration in this unit.