There are plenty of posts talking about a huge blocker on the Module 4 - Unit 2 of the Pages track. Not a single person is able to make the search works. But still no one from Yext seems to care about it.
Just in my team there are at least 5 people doing the trainings and everyone has stopped after reaching this point. But again, who cares right?
Anyways I return to the training today to see if I’m missing something and I found out that the code of the Locations Starter Basic has issues on it. That’s the root cause of all the problems. It is very simple to reproduce:
1- First create a new playground account to avoid connecting to a different project.
2- Create a new pages repo and select “Locations Starter Basic”
3- Proceed with all the remaining steps when creating a new pages project and populate your Knowledge Graph with seed data.
4- Also overwrite the configuration since this is a new project.
5- Move to the new repo folder created and run “npm run dev”
6- Enter the ID of the previously created playground account and select Sandbox over Production.
7- You will be able to see your website running on 5173 port.
Now go to the website and enter any Location listed and check your console and you will be able to see this error:
Uncaught ReferenceError: module is not defined
Simple as that, no changes involved, no nothing, basic stuff just cloning the starter repo and it has ERRORS.
I also notice this warning happening on the console when running ‘npm run dev’ and not sure if it’s related:
pages generate templates
(node:30044) ExperimentalWarning:--experimental-loader
may be removed in the future; instead useregister()
:
–import ‘data:text/javascript,import { register } from “node:module”; import { pathToFileURL } from “node:url”; register(“file%3A%5C%5C%5C%5CD%3A%5C%5CCourses%5C%5CYext%5C%5Cturtlehead-tacos-restaurant-basic%5C%5Cnode_modules%5C%5C%40yext%5C%5Cpages%5C%5Cdist%5C%5Cbin%5C%5Cloader.js”, pathToFileURL(“./”));’
(Usenode --trace-warnings ...
to show where the warning was created)
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: GitHub - browserslist/update-db: CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
So my question is this - Can anyone from Yext team will take a look into this at some point? It is too much asking for starter source code without ERRORS? Are you hearing your community (based on that many dead posts without a response)?