Syntax error: Identifier 'getServerSideProps' has already been declared #14694
-
export async function getServerSideProps(context) {
console.log(context)
return {
props: {}, // will be passed to the page component as props
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
You can only export Are you by chance importing one file ( |
Beta Was this translation helpful? Give feedback.
-
|
Module parse failed: Identifier 'getServerSideProps' has already been declared (101:22)
Import trace for requested module: i got this issue and i have also declared only one page this getServerSideProps prop so lets menow what isiue i got |
Beta Was this translation helpful? Give feedback.
You can only export
getServerSidePropsonce per page inpages/*.Are you by chance importing one file (
page) into the other?