Nuxt3: Using node version below 18
Hi community!
Is it possible to use Nuxt 3 with node version below 18?
I'm trying to run nuxt app on older ubuntu version (v18). However, ubuntu does not support node version above 18 due to glibc incompatibility. I could either:
1. Update ubuntu version
2. Update glibc version
3. Try use lower node version for nuxt 3
Unfortunately I cannot update ubuntu version due project requirement. I could update glibc version of Ubuntu but it seems like i might break the OS environment if I'm not careful with the update.
Can nuxt 3 be used with lower node version like version 17? Thank you in advance!
2 Replies
Hi @Zerro. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
Based on the knowledge sources provided, Nuxt 3 requires Node.js version 18 or newer. This is explicitly stated in the official Nuxt documentation under prerequisites:
Prerequisites
- Node.js - 18.x
or newer (but we recommend the active LTS release)
Installation | Nuxt
There's evidence in the knowledge sources that using Node.js versions below 18 with Nuxt 3 can cause compatibility issues. For example, in a GitHub pull request, the Nuxt team updated the minimum required Node.js version to match their documentation requirements, confirming that Node.js 18 is indeed the minimum supported version.
Additionally, there are several issues reported when using incompatible Node.js versions with Nuxt 3, such as deployment problems and runtime errors.
Regarding your specific situation with Ubuntu 18, you have correctly identified the options. Since you cannot update Ubuntu and are concerned about updating glibc, your options are limited. Unfortunately, using Node.js 17 with Nuxt 3 is not officially supported and would likely lead to compatibility issues.
One potential workaround not mentioned in your options would be to use a containerized approach (like Docker) where you could run Node.js 18+ in a container without modifying your host Ubuntu system.
If you absolutely must use Nuxt with your current environment constraints, you might consider using Nuxt 2 instead, which has different Node.js version requirements. However, note that Nuxt 2 is in maintenance mode and will reach End of Life on June 30, 2024, as mentioned in the roadmap documentation:
Roadmap | Nuxt
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@293755716353785857> Kapa.ai is still learning and improving, please let me know how I did by reacting below.