# Trying to create a grafana plugin

**URL:** <https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004>\
**Category:** Grafana Plugin Development\
**Created:** [October 5, 2018, 8:12am UTC](https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004 "2018-10-05T08:12:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaljyn](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kaljyn](https://community.grafana.com/u/kaljyn)\
**Post date:** [October 5, 2018, 8:12am UTC](https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004/1 "2018-10-05T08:12:04Z")

</div>

Hi everyone !

I’m trying to create my own grafana plugin but I have some issue. I want to add ponctual events on a graph by checking check box for each type of events. I tried to start from the existing graph plugin but it’s impossible I have to start from the beginning. I try to follow the tutorial [https://grafana.com/blog/2016/04/08/timing-is-everything.-writing-the-clock-panel-plugin-for-grafana-3.0/](https://grafana.com/blog/2016/04/08/timing-is-everything.-writing-the-clock-panel-plugin-for-grafana-3.0/) .

But when I want to run the commande line

> npm install

I have the error :

```auto
EJSONPARSE
npm ERR! JSON.parse Failed to parse json
npm ERR! JSON.parse Unexpected string in JSON at position 219 while parsing '{
npm ERR! JSON.parse "name": "perso",
npm ERR! JSON.parse "version": "1.0.0'
npm ERR! JSON.parse Failed to parse package.json data.
npm ERR! JSON.parse package.json must be actual JSON, not just JavaScript.

```

The paquage.json :

```auto
    {
  "name": "perso",
  "version": "1.0.0",
  "description": "check box",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "jojo",
  "license": "MIT"

  "devDependencies": {
  "grunt": "~0.4.5",
  "babel": "~6.5.1",
  "grunt-babel": "~6.0.0",
  "grunt-contrib-copy": "~0.8.2",
  "grunt-contrib-watch": "^0.6.1",
  "grunt-contrib-uglify": "~0.11.0",
  "grunt-systemjs-builder": "^0.2.5",
  "load-grunt-tasks": "~3.2.0",
  "grunt-execute": "~0.2.2",
  "grunt-contrib-clean": "~0.6.0",
  "babel-plugin-transform-es2015-modules-systemjs": "^6.5.0",
  "babel-preset-es2015": "^6.5.0"
}
}

```

In addition, when I start the server it doesn’t see the plugin. It see the other plugin on the folder but not mine.  
I have the plugin.json done and the module.json on subfolder ‘src’.

The plugin.json :

```auto
{
  "type": "panel",
  "name": "check box",
  "id": "grafana-checkbox-panel",

  "info": {
    "description": "Clock panel for grafana",
    "author": {
      "name": "Raintank Inc.",
      "url": "http://raintank.io"
    },
    "keywords": ["clock", "panel"],
    "version": "1.0.0",
    "updated": "2015-03-24"
  },

  "dependencies": {
    "grafanaVersion": "3.x.x",
    "plugins": []
  }
} 

```

Someone can help me with this error 😕 I searched for hours on google but nothing, I cannot figure out what’s the problem here !

---

<div class="post-metadata">

**Author:** ![darrenjwhite95](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@darrenjwhite95](https://community.grafana.com/u/darrenjwhite95)\
**Post date:** [October 5, 2018, 8:35am UTC](https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004/2 "2018-10-05T08:35:18Z")

</div>

> [@kaljyn](#):
>
> “author”: “jojo”, “license”: “MIT” “devDependencies”: {

You’re missing a comma between “MIT” and “devDependencies”

---

<div class="post-metadata">

**Author:** ![kaljyn](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kaljyn](https://community.grafana.com/u/kaljyn)\
**Post date:** [October 5, 2018, 9:05am UTC](https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004/3 "2018-10-05T09:05:54Z")

</div>

What a mess ! Really thank you for guiding the noob I am 😃

---

<div class="post-metadata">

**Author:** ![darrenjwhite95](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@darrenjwhite95](https://community.grafana.com/u/darrenjwhite95)\
**Post date:** [October 5, 2018, 10:05am UTC](https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004/4 "2018-10-05T10:05:25Z")

</div>

No problem! We’ve all be there. Glad I could help 😀

---

<div class="post-metadata">

**Author:** ![kaljyn](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kaljyn](https://community.grafana.com/u/kaljyn)\
**Post date:** [October 5, 2018, 11:41am UTC](https://community.grafana.com/t/trying-to-create-a-grafana-plugin/11004/5 "2018-10-05T11:41:42Z")

</div>

If I make some modification on the module.ts. Do I have to rebuild the plugins ? Like compilation ?

I’m sorry, I’m new doing programmation on the server side !
