From a2a7ad0407484baf911208b3ab48295c4b631a0d Mon Sep 17 00:00:00 2001 From: Timur Shemsedinov Date: Mon, 5 Feb 2024 14:18:00 +0200 Subject: [PATCH] Fix timers namespace PR-URL: https://github.com/metarhia/impress/pull/1958 --- lib/deps.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/deps.js b/lib/deps.js index 81fa996a..e0d1851b 100644 --- a/lib/deps.js +++ b/lib/deps.js @@ -92,7 +92,9 @@ node.StringDecoder = node['string_decoder']; node.perfHooks = node['perf_hooks']; node.asyncHooks = node['async_hooks']; node.fsp = node.fs.promises; -node.timers.promises = require('node:timers/promises'); +if (!node.timers.promises) { + node.timers.promises = require('node:timers/promises'); +} Object.freeze(node); Object.freeze(npm);