Problem with SearchUI Module 1

I’ve run through the four units in SearchUI Module 1, and I hit an error when trying to run the dev server at the end (see below).

I’m running Windows 10 Pro - the same error occurs whether I run npm run dev from the CLI, or from WSL (2 - Ubuntu) - my environment is:
npm 8.19.2
node 18.12.1
deno 1.29.1
yext cli 0.1_311
sandbox id 3190103
OS build 19044.2364

I’ve also tried cloning the module-1 branch, installing npm into it, and replacing the search api key. The same error occurs.

I’ve confirmed the file exists. Is there something else I need to be trying?


An update was just made to the module that you have been working through and hopefully will resolve your issue.

Take a look at unit 2 and follow along with the new instructions. Once you have finished, run npm run dev . Your local development landing page should pop up and look like this:

Let me know if your issue is still not resolved after doing this.

@Aaron_Pavlick Hi, I get the same error using the new approach - in addition, one of our other devs is getting the same error when trying to use npm run dev with after using yext pages new to create a Locations Starter (Basic) page.

Hi William - can you ensure that your PagesJS is using the most recent version available in the npm registry? This would require changing the version of PagesJS referenced in the package.json and then reinstalling dependencies. The error you are encountering on the Windows machine was reported earlier and should be resolved in the most recent version of PagesJS.

Please let us know if this works and happy coding :slight_smile:

@Andrew_Sanchez That seems to have worked, thanks. Is there a knowledge base or bug repository somewhere I could have checked? It never occurred to me that there would be a known, unmentioned bug in the training materials, especially after yext posted a fix to the training that didn’t implement what was apparently a known solution.

For people who might find the previous explanation a bit sparse, to fix the problem, you have to update PagesJS, which is a yext specific package - the older ones apparently don’t work with Windows 10. The current version is 1.0.0-beta.15, which fixes the problem my team encountered, but neither starter package has been updated to reflect the bugfix. To fix it manually:

Edit the package.json file in the root directory of the repository you clone (either Location Starter (Basic) or Search Starter, depending on which training you’re doing). You need to find the line that has:

 "devDependencies": {
      "@yext/pages": "1.0.0-beta.X",

change the X (it will either be 6 or 10, depending on the starter pages you downloaded) to 15.

 "@yext/pages": "1.0.0-beta.15",

then, from the root directory of the project (the same directory where you found package.json) run:

npm install

this will re-install dependencies.

You should be able to continue the training from there.