diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js index e1c56e9b7e6679..bcbb96a87fa598 100644 --- a/lib/internal/bootstrap/node.js +++ b/lib/internal/bootstrap/node.js @@ -529,11 +529,12 @@ } function setupQueueMicrotask() { - const { queueMicrotask } = NativeModule.require('internal/queue_microtask'); Object.defineProperty(global, 'queueMicrotask', { get: () => { process.emitWarning('queueMicrotask() is experimental.', 'ExperimentalWarning'); + const { queueMicrotask } = + NativeModule.require('internal/queue_microtask'); Object.defineProperty(global, 'queueMicrotask', { value: queueMicrotask, writable: true,