before evalmachine.:1 foo.bar = 5; ^ ReferenceError: foo is not defined at evalmachine.:1:1 at Script.runInContext (node:vm:*) at Script.runInNewContext (node:vm:*) at Object.runInNewContext (node:vm:*) at Object. (*test*message*undefined_reference_in_new_context.js:*) at Module._compile (node:internal/modules/cjs/loader:*) at *..js (node:internal/modules/cjs/loader:*) at Module.load (node:internal/modules/cjs/loader:*) at Function.Module._load (node:internal/modules/cjs/loader:*:*) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:*:*)