Skip to content
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

Problem with Kibana 6.7.x #54

Closed
GustavoBellini opened this issue Apr 9, 2019 · 9 comments
Closed

Problem with Kibana 6.7.x #54

GustavoBellini opened this issue Apr 9, 2019 · 9 comments

Comments

@GustavoBellini
Copy link

Hello everyone,

the plugin is not working with Kibana version 6.7.1 and 6.7.

The error below is shown:

@import (reference) "~ui/styles/mixins.less";
^
Can't resolve 'ui/styles/mixins.less' in '/usr/share/kibana/plugins/kibana-time-plugin/public'
in /usr/share/kibana/plugins/kibana-time-plugin/public/time.less (line 1, column 0)
at runLoaders (/usr/share/kibana/node_modules/webpack/lib/NormalModule.js:286:20)
at /usr/share/kibana/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /usr/share/kibana/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/usr/share/kibana/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at process._tickCallback (internal/process/next_tick.js:68:7)

I managed to fix it change the time.less file and updating the first line by @import "/usr/share/kibana/src/ui/public/styles/bootstrapmixins.less";

But now the error below appears:

.visualization-options {
.flex-parent();
^
.flex-parent is undefined
in /usr/share/kibana/plugins/kibana-time-plugin/public/time.less (line 15, column 6)
at runLoaders (/usr/share/kibana/node_modules/webpack/lib/NormalModule.js:286:20)
at /usr/share/kibana/node_modules/loader-runner/lib/LoaderRunner.js:364:11
at /usr/share/kibana/node_modules/loader-runner/lib/LoaderRunner.js:230:18
at context.callback (/usr/share/kibana/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at process._tickCallback (internal/process/next_tick.js:68:7)

Can someone help me?

Thanks.

@RobinELM
Copy link
Contributor

RobinELM commented Apr 10, 2019

Hello,

I encountered the same issue, apparently this is linked to the move from LESS to SASS implemented in 6.7 ( elastic/kibana#23413 ).
The ui/style/mixin.less has been replaced by _mixins.scss , I am not familiar with LESS / SASS and their processing. I tried to import the .scss instead of the .less file but the plugin is missing the right component to integrate it. It might require to move the whole plugin style to SASS as I am not sure if we can mix both =/

@conmurray
Copy link

Thanks @RobinELM for that info. I had checked recently as well and encountered the same issue.
Is moving to SASS a big job?

@holgerbrandl
Copy link

Same problem with v7.0

@andresbrandworkz
Copy link

Hello,

I also found the same issue with Kibana 7.0.0.
Any plans on adapting this plugin for the latest version?

 FATAL  Error: Optimizations failure.
   5643 modules
    
    ERROR in ./plugins/kibana-time-plugin/public/time.less
    Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
    ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):
    
    
    @import (reference) "~ui/styles/mixins.less";
    ^
    Can't resolve 'ui/styles/mixins.less' in '/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/plugins/kibana-time-plugin/public'
          in /home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/plugins/kibana-time-plugin/public/time.less (line 1, column 0)
        at runLoaders (/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/webpack/lib/NormalModule.js:286:20)
        at /home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/loader-runner/lib/LoaderRunner.js:364:11
        at /home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/loader-runner/lib/LoaderRunner.js:230:18
        at context.callback (/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
        at process._tickCallback (internal/process/next_tick.js:68:7)
    
    ERROR in ./plugins/kibana-time-plugin/public/timeController.js
    Module not found: Error: Can't resolve 'ui/timepicker/time_units' in '/home/andres/Apps/Elastic/Kibana/kibana-7.0.0-linux-x86_64/plugins/kibana-time-plugin/public'

Thanks.

@andresbrandworkz
Copy link

Hello everybody,

I got the plugin working on Kibana v7.0.1 with some small modifications.

Screenshot from 2019-05-02 16-40-03

time.less
I changed the path to the mixins.less file. It seems they've placed a legacy folder aside with old files.

@import (reference) "../../../src/legacy/ui/public/styles/bootstrap/mixins.less";

Also, I removed two occurrences of .flex-parent(); because it was making the plugin not compile.
(Not sure why those were needed before, though).

timeController.js
time_units is no longer available. So I removed the import and assigned the constant directly.

// ...
  $scope.units = {
    s: 'second',
    m: 'minute',
    h: 'hour',
    d: 'day',
    w: 'week',
    M: 'month',
    y: 'year'
  };
// ...

It seems to be working, and even synchronising with the new super date picker Kibana is using now.
But can anyone advise about how dodgy this workaround is, please?

Thanks.

@nreese
Copy link
Owner

nreese commented May 2, 2019

Looks good. Would you mind putting together a PR?

@andresbrandworkz
Copy link

Hello,
I have just done it.
#55

@SiwyDym
Copy link

SiwyDym commented May 14, 2019

Fix in PR

@nreese
Copy link
Owner

nreese commented May 15, 2019

closed by #56

@nreese nreese closed this as completed May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants