# Creating custom plugin build fails with typescript enabled

**URL:** <https://discuss.elastic.co/t/creating-custom-plugin-build-fails-with-typescript-enabled/163918>\
**Category:** Kibana\
**Created:** [January 11, 2019, 3:15pm UTC](https://discuss.elastic.co/t/creating-custom-plugin-build-fails-with-typescript-enabled/163918 "2019-01-11T15:15:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martijnrondeel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijnrondeel/32/35415_2.png) [@martijnrondeel](https://discuss.elastic.co/u/martijnrondeel)\
**Post date:** [January 11, 2019, 3:15pm UTC](https://discuss.elastic.co/t/creating-custom-plugin-build-fails-with-typescript-enabled/163918/1 "2019-01-11T15:15:56Z")

</div>

Hi,

As per the [docs](https://www.elastic.co/guide/en/kibana/current/development-plugin-resources.html#_typescript_support), typescript support for a custom plugin can be enabled with a simple `tsconfig.json` file in the plugin root.

```json
{
  // extend Kibana's tsconfig, or use your own settings
  "extends": "../../kibana/tsconfig.json",

  // tell the TypeScript compiler where to find your source files
  "include": [
    "server/**/*",
    "public/**/*"
  ]
}

```

However when I run `yarn build` now it gives me a lot of errors (about 300+) that are not related to my plugin, for example:

```auto
../../../../../kibana/src/core/public/utils/modify_url.ts:20:56 - error TS7016: Could not find a declaration file for module 'url'. '/home/martijn/Repos/kibana/node_modules/url/url.js' implicitly has an 'any' type.
  Try `npm install @types/url` if it exists or add a new declaration (.d.ts) file containing `declare module 'url';`

20 import { format as formatUrl, parse as parseUrl } from 'url';

```

and

```auto
../../../../../kibana/node_modules/@types/react/index.d.ts:2416:13 - error TS2717: Subsequent property declarations must have the same type. Property 'text' must be of type 'SVGProps<SVGTextElement>', but here has type 'SVGProps<SVGTextElement>'.

2416 text: React.SVGProps<SVGTextElement>;

```

I'm running kibana from the 6.x branch. Any help is greatly appreciated 🙂

---

<div class="post-metadata">

**Author:** ![martijnrondeel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijnrondeel/32/35415_2.png) [@martijnrondeel](https://discuss.elastic.co/u/martijnrondeel)\
**Post date:** [January 15, 2019, 10:01am UTC](https://discuss.elastic.co/t/creating-custom-plugin-build-fails-with-typescript-enabled/163918/2 "2019-01-15T10:01:05Z")

</div>

> <https://github.com/elastic/kibana/issues/28745>

---

<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:** [February 12, 2019, 10:01am UTC](https://discuss.elastic.co/t/creating-custom-plugin-build-fails-with-typescript-enabled/163918/3 "2019-02-12T10:01:14Z")

</div>

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