Getting incorrect import path generated in codegen

Hi there again.

I have s simple next project that I build with next export.

I am using the Planty template from plasmic and added to the next project in github as codegen.

And that works fine… Then i change one of the paths from /about to /whonows/about and regenerate the codegen.
The structure generated seems ok as the about page appears on the /pages//whonows/about.jsx directory of the next project but then when i do a → “build”: “next build && next export -o build”

I get the error →
"./pages/whonows/about.jsx
Module not found: Can't resolve '../components/plasmic/planty/PlasmicAboutUs' in '/Users/hector/code_projects/bilayer/nextjs-blog/pages/whonows"

What is strange because the ../components/plasmic/planty/PlasmicAboutUs is correct, in fact is the same that when the page was in /pages/about.jsx

Any ideas of what could be causing this?

Ah!! I see what is the problem… the generated import is wrong ../components/plasmic/planty/PlasmicAboutUs

It should be instead
../../components/plasmic/planty/PlasmicAboutUs

That file in /pages is owned by you, so after the initial generation, the plasmic CLI won’t rewrite it, so if you move things around you’ll need to fix up the imports.

Check out https://docs.plasmic.app/learn/codegen-components/

(There is a plasmic fix-imports command that may help)

Ok. Clear now.
Thanks!
Cheers!