JavaScript Flags & Options
The language of the web, in browsers and server runtimes.All JavaScript pages
- node --disallow-code-generation-from-strings: block eval and new Functionnode --disallow-code-generation-from-strings makes eval and new Function throw EvalError. What is covered, what is not (vm, JSON.parse) and when to use it.
- node --input-type=module: run -e and stdin code as an ES modulenode --input-type=module runs -e, -p and stdin code as an ES module; also commonjs and the -typescript values. Syntax detection in Node 22+ and its errors.
- node --stack-size: raise the JavaScript call stack limit (and why it can crash)node --stack-size raises the V8 call stack limit in KB. Default 984, why large values crash the process, the NODE_OPTIONS refusal and better recursion fixes.
- node --stack-trace-limit: show more than 10 frames in a JavaScript stack tracenode --stack-trace-limit shows more than 10 frames in JavaScript stack traces. Error.stackTraceLimit, NODE_OPTIONS, Infinity and 0, and the performance cost.