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

**URL:** https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421
**Category:** Kibana
**Created:** [April 27, 2021, 5:09pm UTC](https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421 "2021-04-27T17:09:05Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kbujold\_wr](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbujold\_wr](https://discuss.elastic.co/u/kbujold_wr)
#### Post date: [April 27, 2021, 5:09pm UTC](https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421/1 "2021-04-27T17:09:05Z")

</div>

Hi,

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?  
Thanks,  
Kris

---

<div class="post-metadata">

### Author: ![dosant](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dosant/32/64489_2.png) [@dosant](https://discuss.elastic.co/u/dosant)
#### Post date: [April 28, 2021, 3:11pm UTC](https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421/2 "2021-04-28T15:11:35Z")

</div>

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](https://github.com/elastic/kibana/issues/82466)  
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`?

---

<div class="post-metadata">

### Author: ![kbujold\_wr](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbujold\_wr](https://discuss.elastic.co/u/kbujold_wr)
#### Post date: [May 13, 2021, 2:31pm UTC](https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421/3 "2021-05-13T14:31:01Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![kbujold\_wr](https://avatars.discourse-cdn.com/v4/letter/k/9fc29f/32.png) [@kbujold\_wr](https://discuss.elastic.co/u/kbujold_wr)
#### Post date: [May 13, 2021, 9:33pm UTC](https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421/4 "2021-05-13T21:33:48Z")

</div>

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

e.g.

```auto
{
  "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"
  },

```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [June 10, 2021, 9:34pm UTC](https://discuss.elastic.co/t/custom-plugin-fails-yarn-start-with-addition-of-package-json-in-v7-9-3/271421/5 "2021-06-10T21:34:31Z")

</div>

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