It is possible for Node.js to be built without including support for the crypto module. In such cases, calling require(‘crypto’) will result in an error being thrown.
…but that doesn’t explain its availability in the console.
I checked the versions, and tried using the exact version I’m seeing in the console, as well as the latest available version (per nvm). Same result each time.
Also according to Node.js docs, it is possible to build nodejs without crypto. however crypto is included by default. Though, the modules aren’t assign to global variables, what are you talking about? The only global variable I’m aware of is process and console.