- I need plugin for 7.9.1
- Yes, I use plugin-generator
- I must use some dependency. Plugin-generator don't create package.json. So I had to create it manually. It looks like this
{
"name": "my_plugin",
"version": "1.0.0",
"kibana": {
"version": "7.9.1",
"templateVersion": "1.0.0"
},
"license": "Apache-2.0",
"scripts": {
"kbn": "node ../../scripts/kbn.js",
"build": "plugin-helpers build",
"start": "node ../../scripts/kibana --dev",
"lint:es": "node ../../scripts/eslint",
"lint:sass": "node ../../scripts/sasslint",
"lint": "yarn run lint:es && yarn run lint:sass"
},
"devDependencies": {
"@kbn/plugin-helpers": "link:../../packages/kbn-plugin-helpers"
},
"dependencies": {
"@hapi/joi": "^17.1.1",
"@types/hapi__joi": "^17.1.6",
"pg": "^8.4.2",
"typescript": "^4.0.5"
}
}
file .kibana-plugin-helpers.json look like this
{
"buildSourcePatterns": [
"package.json",
"yarn.lock",
"tsconfig.json",
"{public,server}/**/*",
"kibana.json"
]
}
kibana.json as created by plugin-generator
{
"id": "myPlugin",
"version": "7.9.1",
"server": true,
"ui": true,
"requiredPlugins": ["navigation"],
"optionalPlugins": []
}
Now yarn build create plugin zip and I can install plugin. Kibana starts with plugin. I see it in the list on the console (cli) when kibana starts. Now no errors. But kibana don't work, I see red banner when connect to http.
With yarn start --oss everything work fine.
Maybe someone has an example of how to build a plugin with dependencies