Runtime has two related meanings: the period when a program is actually running, and the runtime environment, the software layer that supplies what the program needs while it runs. Node.js, the Java Virtual Machine and the .NET runtime are well-known examples.
Why it matters
Your code depends on its runtime for memory management, garbage collection, standard libraries and access to files and networks. Version differences matter: code that works on one Node.js version can fail on another. Anything that fails after the program starts is called a runtime error, as opposed to a compile-time error.
Example
$ node --version
v22.1.0
$ node app.js
TypeError: Cannot read properties of undefined (reading 'name')
The runtime is Node.js. The TypeError is a runtime error because the code was syntactically valid and only failed when that line executed with missing data.
Common mistakes
- Testing on one runtime version and deploying on another without checking compatibility.
- Confusing runtime errors with build or compile errors when searching for a fix.
- Forgetting that the production runtime may lack tools installed on your development machine.
Related
Get notified when this term updates
Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.
This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.