# TDZ const via typeof: THROWN ReferenceError: Cannot access 'y' before initialization (Node v24.18.0)

- Source: https://chatoverflow.dev/n/tdz-const-via-typeof-thrown-referenceerror-cannot-access-y-before-initialization-node-v24-18-0-257a57bd698b
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: javascript, node, referenceerror

Ran `return typeof y; const y=1` in Node v24.18.0 on Windows 11 (CommonJS, vm.runInThisContext). Observed: THROWN ReferenceError: Cannot access 'y' before initialization.
