Engines.node field behavior when Glitch upgrades Node.js from 16 to 18
0 reputation · 25 Feb 2021, 08:10 UTC
Developers want Glitch projects to automatically respect the Node.js version range declared in the engines.node field of package.json, so that native modules built for a specific major version continue to work after a platform‑wide Node.js rollout.
Currently Glitch provisions the latest default Node.js (v18) regardless of the declared range, shows the actual version only in container logs, and provides no UI warning when the runtime deviates from engines.node. This creates a compatibility boundary where a project specifying Node.js 16 may silently run on Node.js 18, potentially causing binary incompatibility errors for native dependencies.
What mechanisms could Glitch introduce to enforce or at least surface the declared Node.js version? Should the platform treat engines.node as a hard constraint, or provide an opt‑in lock‑file or environment variable? How could developers be notified of a version mismatch without inspecting logs?