From 04b36e7374003e13382b63000a2561430b150cc2 Mon Sep 17 00:00:00 2001 From: inglkruiz <12603425+inglkruiz@users.noreply.github.com> Date: Mon, 12 Dec 2022 14:10:03 +0100 Subject: [PATCH] fix: registry Use parsedModule.module for modulePath Signed-off-by: inglkruiz <12603425+inglkruiz@users.noreply.github.com> --- packages/node_modules/@node-red/registry/lib/externalModules.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/node_modules/@node-red/registry/lib/externalModules.js b/packages/node_modules/@node-red/registry/lib/externalModules.js index b61392d9b..d5131b8e7 100644 --- a/packages/node_modules/@node-red/registry/lib/externalModules.js +++ b/packages/node_modules/@node-red/registry/lib/externalModules.js @@ -144,7 +144,7 @@ function importModule(module) { // specific file that is loaded when the module is required/imported // As this won't be on the natural module search path, we use createRequire // to access the module - const modulePath = createRequire(moduleDir).resolve(module) + const modulePath = createRequire(moduleDir).resolve(parsedModule.module) // Import needs the full path to the module's main .js file // It also needs to be a file:// url for Windows const moduleUrl = url.pathToFileURL(modulePath);