ppadovani / KibanaNestedSupportPlugin

A plugin for Kibana 5.5 and beyond that adds support for nested field search and aggregation.
https://ppadovani.github.io/knql_plugin/overview/
Apache License 2.0
79 stars 7 forks source link

v6.1.2-1.0.0: Optimizations failure - Unexpected token: operator (>) #33

Closed tobiaswerner closed 6 years ago

tobiaswerner commented 6 years ago

Hi Pierre,

thank you for your work and effort in making nested fields available in Kibana. Unfortunately it fails when optimizing JavaScript/caching browser bundles.

Do you have an idea what's happening? I found some resources saying that babel do not run correctly or do not run the time it is intended to be run.

bin/kibana-plugin install file://<path-to>/nested-fields-support-6.1.2-1.0.0.zip

Attempting to transfer from file://<path-to>/nested-fields-support-6.1.2-1.0.0.zip
Transferring 43344901 bytes....................
Transfer complete
Retrieving metadata from plugin archive
Extracting plugin archive
Extraction complete
Optimizing and caching browser bundles...
Plugin installation was unsuccessful due to error "Optimizations failure.
   5183 modules

    ERROR in commons.bundle.js from UglifyJs
    Unexpected token: operator (>) [commons.bundle.js:251028,47]
"

I am running ElasticSearch and kibana both in version 6.1.2:

bin/kibana --version
6.1.2

bin/elasticsearch --version
Version: 6.1.2, Build: 5b1fea5/2018-01-10T02:35:59.208Z, JVM: 1.8.0_131

Any help is appreciated! :-)

ppadovani commented 6 years ago

I'll take a look at it.. I ran the plugin fine within my dev environment... I'll perform a normal install and try and duplicate your issue.

Edit: I was able to reproduce this. I didn't think that performing a build would cause different behavior than running in the dev environment. I'll figure out where the issue is and get a fix soonish.

Edit 2: Looks like the optimizer doesn't like the => operator... I'll convert those and see if that resolves the issue. Expect an updated build either today or tomorrow.

ppadovani commented 6 years ago

Quick update. Tracked this down to something with my query parser. Not quite sure what UglifyJs doesn't like about it.. so this might take a day or two to figure out a solution for.

ppadovani commented 6 years ago

fixed and released.

tobiaswerner commented 6 years ago

Thanks a lot! Unfortunately an error appears "SourceFormat is undefined". grafik

Tried with latest release 6.1.2-1.0.2

ppadovani commented 6 years ago

I see the issue...

ppadovani commented 6 years ago

Released... please verify that 1.0.3 works for you. If so, please close this issue.

Thanks!

tobiaswerner commented 6 years ago

Very good 👍 Thank you!