How to Change Node.js Version on cPanel Terminal
Overview Some cPanel servers include an outdated system Node.js version (often Node 10 or Node 12). Modern applications frequently require Node.js 18+, but the default shell environment may still point to the older system version. On cPanel servers that provide CloudLinux alt-nodejs packages (e.g., alt-nodejs20), you can override the default…
Out of memory error with Node.js and cPanel Terminal
Description When running a npm or Node.js command via the Terminal app in cPanel, a “Out of memory” error message is returned. Cause The issue is not typically due to a hosting-level resource limit such as memory or storage. The emulated Terminal app in cPanel itself has an artificial memory…
Next.js “Module not found” when running a Next.js build in cPanel
Description When running npm run build, or next build, npm returns the error “Module not found”. npm ci or npm install shows that all dependencies or modules are installed. Cause Path issue cPanel’s virtual environment causes issue with TypeScript’s path aliases, which can prevent npm build from discovering the location…