Reputation: 21
We built a Nextjs 14 with an App Router and SSR website because of certain regularities and data protection. Our entire codebase, CI/CD pipeline, and hosting service need to sit on Azure DevOps. However, after following so many tutorials and getting success in build and deployment to Azure Web App service, the website just won't run.
I have tried the pm2 startup command but just won't be able to find the next module even though I've already copied the next file to node_modules.
If anyone has encountered this specific use case, please reach out and help. Appreciate it!
Upvotes: 2
Views: 1789
Reputation: 8195
I tried creating one NextJs app
with SSR
and routing and tried the deployment via Azure DevOps pipline
and it loaded successfully, Refer below:-
I tried deploying via normal Azure DevOps pipeline
but
the app failed to load.
In order to deploy your NextJJs app successfully via Azure DevOps pipeline, Refer my SO answer here. Where I have built the App and used next start
command as a startup script.
Alternatively, When I tried deployment via VS Code the app worked successfully, Refer below:-
Output:-
Upvotes: 0