Error when running npm run dev for React Pages

Hi Team,

I’m seeing a consistent error when following the Create Your Site HH talk track.

Everything is fine up until npm run dev is applied via the terminal. I’m seeing the following error:

Error fetching sample documents for stream root-stream
Failed binding the following fields to the schema: [dm_directoryChildren]
The document scope references the following object ids that are missing from the account: [ce_root]

Followed by this response:

ERROR: 400 Bad Request
You may ask for help in the community at https://hitchhikers.yext.com/community

It seems to fall over at the last hurdle. Everything works seamlessly until this point.

Would it be possible for someone to advise me on the next steps so the localhost:5173 runs successfully?

Many thanks

Sam

Hi Sam,

This error is occurring because your templates reference a field that doesn’t exist in your account - specifically, dm_directoryChildren.

Per this section, did you do step 6? That indicates to the pages command to “seed” your account with the necessary Knowledge Graph configuration to ensure you don’t run into this error.

Alternatively, you could manually apply the directory configuration schema to your account using yext resources apply [insert folder].

Best,
Luc

Thanks Luc, this worked. I was selecting “N” to that step as I wanted to use my own KG data, but this was a quick fix. Good to know about the Directory Manager field not referenced.

Cheers,

Sam