-
Bug
-
Resolution: Done
-
Blocker
-
1.4, 1.5.0
-
None
-
2
-
False
-
-
False
-
-
Bug Fix
-
Done
-
-
-
RHDH Dynamic Plugins 3266
Description of problem:
The export-dynamic-plugin command encounters an issue when a required dependency is located more than one level deep within the node_modules directory structure. This commonly occurs when different plugins depend on varying versions of the same package. In such cases, the top-level node_modules might contain a version different from the one actually required by the plugin being exported.
While the correct dependency version does exist deeper within the node_modules hierarchy (e.g., within the node_modules folder of another dependency), the export-dynamic-plugin command fails to locate it. This results in a failed export, even though the necessary dependency is present within the project.
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce:
- Create a Backstage project with a plugin that depends on package 'A' version 1.0.0.
- Add another plugin which depends on a different version of package 'A', for example 2.0.0. This will likely install it directly under node_modules, causing the version mismatch.
- Add another dependency package 'B' which depends on package 'A' version 1.0.0. Package 'B' would therefore have it's own package 'A' v1.0.0 located under node_modules/B/node_modules/A.
- Try to export the first plugin using the export-dynamic-plugin command.
Actual results:
The export-dynamic-plugin command fails to locate the required dependency version and throws an error, halting the export process.
Expected results:
The export-dynamic-plugin command should successfully locate and include the correct version of the dependency, regardless of its nesting level within the node_modules structure. The export should complete without errors.
Reproducibility (Always/Intermittent/Only Once):
Always