New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frontend setup fail #66
Comments
I tried with node 18 latest version and it works |
Could you write exact node version? Is it 18.12.1? |
Hello, I also got the same issue. My node version is 18.12.1. |
I need help with this too |
With the nextjs frontend regarding the strapi/next blog, you have to use node 16.14.0 and also use yarn (I use yarn 1.22.19). |
I'll wait a patch for strapi starter next-blog. This one doesn't work with node 18.12.1 and yarn .1.22.19. Tomorrow I'll try with node 16.14.0, are you sure it works with this version? @massweb58 |
Yes it works fine with nodejs 16.14.0. FYI, the blog with Gatsby and STrapi works with the latest version of nodejs 18.x.x |
I have just done... I confirm it works with node@16.14.0. Thanks @massweb58 |
Can't get |
MacOS 12.6.1
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
|
These are my fixes:
export async function getGlobalData(locale) {
...
const global = await globalRes.json()
// you may add this block if you wish to see the error message
if ( global.errors ) {
global.errors.forEach( e => console.log(e.message));
}
return global.data?.global.data; // <-- here
}
const MyApp = ({ Component, pageProps }) => {
// Extract the data we need
const { global } = pageProps
// add following block!
if ( ! global ) {
return <ErrorPage statusCode={404} />
}
...
export async function getStaticProps(context) {
...
return {
props: {
preview,
sections: contentSections,
metadata,
global: globalLocale, // <-- here! remove .attributes
pageContext: {
...pageContext,
localizedPaths,
},
},
}
} Ensure that you have all 'Global' content created with all fields on the back-end. |
After command used:
npx create-strapi-starter mysite3 next-corporate
Backend installed and run successfully but frontend did not.
I'm getting this error:
TypeError: Cannot destructure property 'metadata' of 'global.attributes' as it is undefined.
Anyone can help me with this issue?
regards,
The text was updated successfully, but these errors were encountered: