I am trying to collaborate with node.js internals. I found the realm.js file and I tried to realize a print using process.stdout.write() method but launched an error at moment to compile:
I would like to know why process object is different in realm.js file compared with another normal .js file?
Minimal Reproduction
write process.stdout.write() in any code line in internal realm.js file
Output
TypeError: Cannot read properties of undefined (reading 'write')
at internalBinding (node:internal/bootstrap/realm:185:20)
at node:internal/bootstrap/realm:191:3
Before You Submit
[X] I have looked for issues that already exist before submitting this
Node.js Version
v23.0.0-pre
NPM Version
not apply
Operating System
not apply
Subsystem
Other
Description
I am trying to collaborate with node.js internals. I found the realm.js file and I tried to realize a print using process.stdout.write() method but launched an error at moment to compile:
I would like to know why process object is different in realm.js file compared with another normal .js file?
Minimal Reproduction
write process.stdout.write() in any code line in internal realm.js file
Output
TypeError: Cannot read properties of undefined (reading 'write') at internalBinding (node:internal/bootstrap/realm:185:20) at node:internal/bootstrap/realm:191:3
Before You Submit