One of my website project seems unable to build as of late
I can’t pin down the reason as it seems to get hung up right as it’s loading pages from Plasmic
Now, I can’t even see anything in Plasmic Studio
Plasmic Project
One of my website project seems unable to build as of late
I can’t pin down the reason as it seems to get hung up right as it’s loading pages from Plasmic
Now, I can’t even see anything in Plasmic Studio
Plasmic Project
Hello @leafer_design, thanks for reporting. We have identified the issue with build failure and are working on a fix
Thanks for the quick reply! Looking forward to the fix
The issue is fixed. You should be able to build successfully.
Also, in codegen, the build returned a separate error along the lines of TypeError: Cannot destructure property 'auth' of 'e' as it is undefined
. This happens when you have a link with no href. To fix this, you should either figure out which link that is in your project, or better, pass PlasmicRootProvider
the link prop as below:
function SafeLink(props) {
if (props.href) {
return <Link {...props} />;
}
return <a {...props} />;
}
export default function MyApp({ Component, pageProps }: AppProps) {
return (
<PlasmicRootProvider Head={Head} Link={SafeLink}>
<Component {...pageProps} />
</PlasmicRootProvider>
);
}
Hi Sarah,
Thank you for looking into my issue!
I appreciate the advice, but I need more specific guidance to fix the link error
First, I thought my project was using the loader mode (not codegen)? Is there code or something causing it to seem that way?
Second, my project already has a “CustomLink” function snippet in the [...catchall].tsx
as suggested by @icaro_guerra.
Is it not working as intended, to result in that build issue? If so, what should I do to fix it?
Better yet, is there some way I can hunt down the “no href” links? In other (newer) Plasmic projects, I don’t seem to be getting this issue when the href line in Studio is blank.
Hello @leafer_design, if you’re using loader mode, then you don’t need to do anything. The fix we just pushed should be enough - please build the project again, it should work.