Answer the question
In order to leave comments, you need to log in
How to assemble?
Good afternoon. For work I use next.js. When executing the function, the assembly with the npm run build command does not work. What could be the problem? If the function is removed, then everything works. The function is in the index.js file
export const getStaticProps = async () => {
const res = await axios.get(`${url}/Home`);
return {
props: {
list: res.data.homepage,
about: res.data.about,
reviews: res.data.review,
},
revalidate: 1,
};
};
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question