Custom Plugin fails yarn start with addition of package.json in v7.9.3


I have a custom plugin that I modeled after "node scripts/generate_plugin". I am trying to add a package.json file so I can build the plugin and the dependencies. But before I even get to the build, I get this error when I do a "yarn kbn bootstrap" followed by "yarn start"

FATAL Error: Plugin with id "my_plugin" is already registered!

Does anyone knows what this is about?

Hi @kbujold_wr, I am not 100% sure that this is an issue you are hitting, but looks like Kibana had some problems with external plugins in 7.9 [kbn/plugin-helpers] Building Kibana Platform plugins for 7.9 · Issue #82466 · elastic/kibana · GitHub
Could you try a newer version and try the same steps?

Also, is there a chance that you've somehow created multiple plugins with the same id my_plugin?

We cannot use 7.10. There is only one plugin. If the package.json file is removed then there is no errors but the node_modules folder is not created which causes kibana not to launch since there are missing dependencies.

I have fixed this issues by updating the package.json start under scripts
from "plugin-helpers start" to "node ../../scripts/kibana --dev"


  "name": "test",
  "version": "0.0.1",
  "description": "My Plugin",
  "scripts": {
    "preinstall": "node ../../preinstall_check",
    "kbn": "node ../../scripts/kbn",
    "es": "node ../../scripts/es",
    "lint":"eslint . --ext .js,.ts,.tsx",
    "start": "node ../../scripts/kibana --dev",
    "test:server": "plugin-helpers test:server",
    "test:browser": "plugin-helpers test:browser",
    "build": "plugin-helpers build",
    "build-graphql-types": "node scripts/generate_types_from_graphql.js"
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.