Skip to content

fix: report missing plugin files - #5870

Open
AkhilTrivediX wants to merge 1 commit into
node-red:mainfrom
AkhilTrivediX:agent/report-missing-plugin-files
Open

AkhilTrivediX wants to merge 1 commit into
node-red:mainfrom
AkhilTrivediX:agent/report-missing-plugin-files

Conversation

@AkhilTrivediX

Copy link
Copy Markdown
Contributor

Summary

  • report a warning when a plugin declares a runtime file that is not present
  • retain the load error so the invalid plugin is not treated as a plugin without a runtime component
  • add a regression test covering the missing-file path

Root cause

Plugin loading only set plugin.file when the declared JavaScript or CommonJS file existed. When neither file was present, the plugin was treated as having no runtime component and loading returned successfully without a diagnostic.

Validation

  • npx mocha test/unit/_spec.js test/unit/@node-red/registry/lib/loader_spec.js
  • npx eslint packages/node_modules/@node-red/registry/lib/loader.js test/unit/@node-red/registry/lib/loader_spec.js

Fixes #5840.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jul 16, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: AkhilTrivediX / name: Akhil Trivedi (0ce5cd9)

@hardillb

Copy link
Copy Markdown
Member

@AkhilTrivediX Thanks for these PRs.

Please complete the CLA as we can't review or merge these without it being signed.

@AkhilTrivediX

Copy link
Copy Markdown
Contributor Author

/easycla

@knolleary knolleary left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not quite right. The supplied file may be the html file for the plugin - in which case plugin.file won't be defined, but that's okay as long as file does exist.

I think the proper fix will be earlier in this function - verifying that the fileInfo.file exists, regardless of the type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A plugin missing files it claims to contain doesn't get reported

3 participants