To Solve Error: error:0308010C:digital envelope routines::unsupported You can also set NODE_OPTIONS globally and that will resolve this error. First of all, open your terminal and run this command in your windows system: set NODE_OPTIONS=--openssl-legacy-provider If You are using Windows Git Bash, Linux or macOS then You need to run this command: export NODE_OPTIONS=--openssl-legacy-provider If You Dont have NODE_OPTIONS setup in your system then you can also set the NODE_OPTIONS environment variable right before issuing the command for a particular project. You just need to change below line in your package.json file: "dev": "NODE_OPTIONS=--openssl-legacy-provider next dev", "build": "NODE_OPTIONS=--openssl-legacy-provider next build && next export", Now, Your error will be solved.