I have a react web app with Next.Js. I want To upload it on my IIS ftp. Should I copy .next folder? If yes, Why I get error on this case?
Error screenshot:
I have a react web app with Next.Js. I want To upload it on my IIS ftp. Should I copy .next folder? If yes, Why I get error on this case?
Error screenshot:
add this to your package.json scripts : "prod": "next export" and after building run this script then copy the output folder : /out
To run node js app on iis you need to configure the iisnode module. https://github.com/tjanczuk/iisnode
then run below command to build the application:
npm run build
which creates the production application in the .next folder.
https://nextjs.org/docs/advanced-features/static-html-export