Plugin building issue

Hi !

I created a visualization plugin for Kibana 7.14.0.
When I try to build it using the kibana plugin helper package, I get the following error:

SassError: File to import not found or unreadable: src/core/public/mixins.
           on line 3 of /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.scss
 >> @import 'src/core/public/mixins';

This is the stack error :

         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.scss?v7dark 2:26-317
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.scss
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/components/layout/discover_layout.tsx
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/components/layout/index.ts
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/discover_main_app.tsx
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/apps/main/index.ts
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/angular/create_discover_directive.ts
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/application/angular/get_inner_angular.ts
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/plugin.tsx
         │           @ /home/pchakour/dev/kibana/src/plugins/discover/public/index.ts
         │           @ /home/pchakour/dev/kibana/src/plugins/visualizations/public/plugin.ts
         │           @ /home/pchakour/dev/kibana/src/plugins/visualizations/public/index.ts
         │           @ ./public/timeline_vis_renderer.tsx
         │           @ ./public/plugin.ts
         │           @ ./public/index.ts
         │           @ /home/pchakour/dev/kibana/node_modules/@kbn/optimizer/target/worker/entry_point_creator.js

In my file ./public/timeline_vis_renderer.tsx, I import the VisualizationContainer component to render my visualization.

Someone has already have this issue during a plugin building ? It's like an includePaths for SCSS is missing :frowning:

Hmm, I'm not running into the same issue. Could you try running yarn kbn clean and yarn kbn bootstrap before running node scripts/generate_plugin again?

Hey @lukas !

thanks for your answer

I tried but I got the same issue when I run the yarn build command in my plugin.

I did an example to illustrate the issue in this repository: GitHub - pchakour/kibana-vis-build-issue
This plugin works well in dev mode but I'm not able to build it :sob:

Could you try to build it ? If you succeed the build, the problem is probably due to my environment.

No one can help me ? :cry:

I was able to successfully build your plugin using 7.16

  1. git clone git@github.com:elastic/kibana.git
  2. cd kibana
  3. yarn kbn bootstrap
  4. cd plugins
  5. git clone git@github.com:pchakour/kibana-vis-build-issue.git
  6. cd kibana-vis-build-issue
  7. yarn install && yarn build

If the above steps still don't work in 7.14 could you try on 7.16?

Ok, it seems to work from the v7.15.0.
I tried with the following versions :

  • 7.14.1 -> Failed
  • 7.14.2 -> Failed
  • 7.15.0 -> OK
  • 7.15.1 -> OK

So, I'm going to migrate my plugins on Kibana 7.15.1...
Thanks for your help guys :slight_smile:

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