After creating a new project with TypeScript using create-next-app
, I encountered an error in the default homepage when opened in my IDE (WebStorm).
The error message reads: "Initializer type () => JSX.Element is not assignable to variable type NextPage."
https://i.sstatic.net/ylouP.png
Despite this error, the project still builds and runs successfully using yarn dev
.
I need help figuring out what's causing this issue. Can anyone assist?