1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

fix: registry

Use parsedModule.module for modulePath

Signed-off-by: inglkruiz <12603425+inglkruiz@users.noreply.github.com>
This commit is contained in:
inglkruiz 2022-12-12 14:10:03 +01:00
parent 113d42ef35
commit 04b36e7374
No known key found for this signature in database
GPG Key ID: 9EB16FF5ACB54DC3

View File

@ -144,7 +144,7 @@ function importModule(module) {
// specific file that is loaded when the module is required/imported // 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 // As this won't be on the natural module search path, we use createRequire
// to access the module // 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 // Import needs the full path to the module's main .js file
// It also needs to be a file:// url for Windows // It also needs to be a file:// url for Windows
const moduleUrl = url.pathToFileURL(modulePath); const moduleUrl = url.pathToFileURL(modulePath);