Azure webapp github build and deploy action failing for nuxt4
Fail log:
Onyx is forcing me into node v17, is there any solution to this?
11 Replies
Hi @code. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Your build is failing because Nuxt 4 (and its dependencies, like Vite and Nitro) now require Node.js 20 or newer. Your Azure Web App build environment is using Node.js 18.20.8, which is not supported by recent Nuxt versions and some of their dependencies, as shown by the EBADENGINE warnings in your logs. This is a known and intentional requirement: Nuxt's documentation and recent pull requests confirm that Node.js 20+ is the minimum version required for Nuxt 4 projects, due to upstream requirements from Vite and Nitro as well docs: use node v20 for minimum requirement for nuxt setup Installation.
Solution:
You need to configure your Azure Web App (Oryx) build pipeline to use Node.js 20 or newer. The knowledge sources do not provide Azure-specific instructions, but the general requirement is clear: Nuxt 4 will not build or run on Node.js 18. If Oryx is forcing Node.js 18, you must override this by explicitly setting the Node.js version to 20 or higher in your Azure build configuration. This is typically done by specifying an
You must upgrade your build environment to Node.js 20 or newer to successfully build and deploy Nuxt 4 applications. Node.js 18 is no longer supported for Nuxt 4 Installation docs: use node v20 for minimum requirement for nuxt setup. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
You need to configure your Azure Web App (Oryx) build pipeline to use Node.js 20 or newer. The knowledge sources do not provide Azure-specific instructions, but the general requirement is clear: Nuxt 4 will not build or run on Node.js 18. If Oryx is forcing Node.js 18, you must override this by explicitly setting the Node.js version to 20 or higher in your Azure build configuration. This is typically done by specifying an
engines field in your package.json:
Or by setting an environment variable or configuration in your Azure pipeline to use Node.js 20+.
Summary:You must upgrade your build environment to Node.js 20 or newer to successfully build and deploy Nuxt 4 applications. Node.js 18 is no longer supported for Nuxt 4 Installation docs: use node v20 for minimum requirement for nuxt setup. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
<@708156039115178014> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@code.73 set this in nuxt config
I added, still same issue:


could you try also adding engines to package.json
Trying atm
you can use 22 there but for api use (keep) 20 cuz swa doesnt support newer
Nope 🙁
one sec, different errors now
Okay onxy is using 22 now
Do I just suck it up and not use lazy loading?
i think you should use different provider anyways because swa got crazy cold starts and your bundle is kinda big
but basically it works now, theres just issue with nuxt img
So I had to change the build and deploy dir from dist to
output_location: ".output/public" for it to build since the error The app build failed to produce artifact folder: 'dist'. Please ensure this property is configured correctly in your workflow file.
but I'm getting a 404, does nitro use dist or?
I had to add:
Thansk for all your help owl!