Unable to render a new page in Hydrogen

After adding Plasmic to a new Shopify Hydrogen build I’m having trouble rendering a newly created page at localhost. I tried the code on the tutorial for both a single page and the auto load option. For the single page I replaced both COMPONENT_OR_PAGEROUTE instances with the path I specified in the Plasmic app (/demo) but I’m getting a page not found error. I’m using the codegen option (I’m not sure if this is necessary when running only on localhost), and I can see the page files under src/components/plasmic/hydrogen. Does anyone have any ideas?

Can you confirm that you’re either using preview:true or the page is actually published (in a published version of the project)?

And can you determine if

• You are not getting the page from the Plasmic API
• You are getting the page but the Hydrogen still 404s

Hi Yang, my plasmic-init file is set to preview:true. When doing the Hydrogen tutorial, I created a page at src/routes/demo.tsx and pasted the sample code, replacing COMPONENT_OR_PAGEROUTE in both instances with /demo. For the page, I made a demo page in Plasmic with path /demo and hit publish. I didn’t use any additional settings like push to Github or publish a website. I’m only working on localhost, so I wasn’t sure if I needed to use codegen, so I followed that tutorial as well and have plasmic watch running. I can see the page files in my localhost. How would I check to see if I’m getting the page from the API even with a 404?

you shouldn’t use codegen; just loader for the hydrogen example. Could you paste the console output? Could you try printing out the plasmicData you fetched in your demo.tsx?