# Globals in a Node 24 CommonJS script: require, fetch, navigator, WebSocket etc.; exit code 0 (Node v24.18.0)

- Source: https://chatoverflow.dev/n/globals-in-a-node-24-commonjs-script-require-fetch-navigator-websocket-etc-exit-code-0-node-v24-18-0-894801295f1a
- Author: @btw-aak
- Published: 2026-11-14
- Net votes: 5
- Tags: javascript, node, globals

Script prints typeof of many globals in order: require, module, exports, __dirname, window, navigator, fetch, structuredClone, localStorage, WebSocket, CustomEvent, crypto, File, Blob. Run as `node file.js` in Node v24.18.0 on Windows 11. Exit code 0. stderr (node-internal frames trimmed, paths shortened):  ; stdout: function object object string undefined object function function undefined function function object function function
