How can I deploy a NextJs 14 app

IE 0 Reputation points
2024-01-15T22:34:19.2366667+00:00

Hello, I am having issues deploying next.js 14 boilerplate code. I am using the "App Services" extension in VScode for a streamlined deployment process and I ran into the attached error message. User's image

I currently have node version 20 installed on my computer. What can I do differently to resolve the issue. Thank you,

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Thameur-BOURBITA 36,261 Reputation points Moderator
    2024-01-15T22:46:30.52+00:00

  2. ajkuma 28,036 Reputation points Microsoft Employee Moderator
    2024-01-16T08:57:27.6933333+00:00

    IE, Adding to the articles shared by Thameur-BOURBITA.

    On App Service, Error: Couldn't detect a version for the platform 'nodejs' in the repo.

    Possible reason for this error:

    The Node.js toolset is run when the following conditions are met:
    One of these files is found in the root of the repo:

    • package.json
    • package-lock.json
    • yarn.lock

    One of these files is found in the root of the repo:

    • server.js
    • app.js

    If Oryx is not finding any condition met then it will not detect any platform or nodejs version, check reference for more information.

    ** Kindly try these steps to isolate the issue:**

    -Review if your files are in root folder when doing git commits and if there is any

    package.json/yarn.lock and you have any application files like app.js, server.js to detect a valid Node.js application.

    • When doing ZipDeploy and using Oryx build check if file directories are correct inside the zip file and not having a subdirectory.

    If the issue still persist, please try these steps:

    1. You may always leverage App Service diagnostics from Azure Portal> Navigate to your App Service app in the Azure Portal.
    2. In the left navigation, click on Diagnose and solve problems - Review and run - "Configuration and Management”  and “Availability and Performance”

    Ref: Troubleshooting Node.js deployments on App Service Linux

    Kindly let us know, I'll follow-up with you further.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.