-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3rd party plugin boiler plates attempts to import '../../../../src/core/server' which doesn't exist on production installations of Kibana. #169850
Comments
Pinging @elastic/kibana-operations (Team:Operations) |
Thanks for reporting this. We have moved into isolated packages and the import |
@btychon you're right. Looks like our brotli compression is broken when creating an external plugin for production environment. I already know what the problem is and will report back once it is fixed. For now, as a workaround, please delete the generated |
I unzipped the artifact and deleted everything in |
@btychon we had indeed a problem with decompressing the generated brotli assets for external built plugins which will be fixed as soon as #170203 gets merged. I've made some tests with some example plugins and things seems to be working okay now. Regarding what you're mentioning, I'm not aware we have changed how we install node modules in the generated archive upon the external plugin build (the sourcecode for that matter is the same in between version 7.13 and 8.10). I would advise you to check if the dependencies in the package.json (for production) are the same in both those examples you're sharing as well as the yarn version you're using there. I'm going to close this issue as the original problem is not a problem anymore. If you find further problems please lets open another issue. Thank you very much for helping us catching those problems 🙇 |
BTW... you guys did some magic with the plugin's artifact size. It went from 16MB to 2MB.
|
Kibana version:
8.10.4
Elasticsearch version:
8.10.4
Server OS version:
Ubuntu 22
Browser version:
Evergreen
Browser OS version:
Windows or Linux
Original install method (e.g. download page, yum, from source, etc.):
Download and install Kibana. Then install the 3rd party boiler plate plugin.
Describe the bug:
The boiler plate generator
node /kibana/scripts/generate_plugin.js
produces a file/kibana/plugins/testplugin/server/index.ts
That file contains an import statement:
import { PluginInitializerContext } from '../../../src/core/server';
When running Kibana in development mode the import statement works because the dependency exists at
/kibana/src/core/server
. However if the plugin is installed on a production version of Kibana (offline install or within a container) the import statement fails because that file doesn't exist.Steps to reproduce:
yarn start
). Install the plugin ZIP artifact.Expected behavior:
The import statement should work whether the plugin is running Kibana in Development or Production mode. There is no file
/kibana/src/core/server
on the latter.Either:
/kibana/srce/core/server
on the offline version of Kibana. It used to exist in earlier releases.Screenshots (if relevant):
Errors in browser console (if relevant):
Provide logs and/or server output (if relevant):
[FATAL][root] Reason: Cannot find module '../../../src/core/server'
Any additional context:
The text was updated successfully, but these errors were encountered: