Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the build process to use the latest LTS version of Node.js #1527

Open
gateremark opened this issue Aug 8, 2024 · 0 comments
Open

Comments

@gateremark
Copy link

Is your feature request related to a problem? Please describe.
The current build process for Azure Static Web Apps uses Node.js version 16.20.2, but Next.js requires a minimum version of 18.17.0. This results in build failures for Next.js-based applications deployed to Azure Static Web Apps.

Failed Build

Describe the solution you'd like
I would like to request that the build process for Azure Static Web Apps be updated to use Node.js version 18 + (or the latest LTS version) when building Next.js applications. This would allow Next.js-based applications to be successfully built and deployed to Azure Static Web Apps without encountering version incompatibility issues.

Describe alternatives you've considered
As a workaround, I've found 2 solutions that work:

  1. I've added a step to my GitHub Actions workflow to manually set the Node.js version to 18 before running the build.
  2. I've specified the Node version I require in my package.json file with the engines property.
"engines": {
      "node": ">=18.7.1"
  }

Both solutions resolve the issue, but it would be better if the build process handled this automatically for all Next.js-based applications.

Additional context
Successful Build after the workarounds above:

Successful Build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant