ERROR unexcepted token in Kibana Dev Contributing

Hello everyone!
I want to build a plugin in Kibana. So I followed guide in think: https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md

But when I run:
yarn start

It has more errors, example:

ERROR in ./node_modules/@kbn/ui-framework/src/components/panel_simple/panel_simple.js
Module parse failed: D:\ELK Test\kibana\kibana\node_modules\@kbn\ui-framework\src\components\panel_simple\panel_simple.js Unexpected token (21:2)
You may need an appropriate loader to handle this file type.
|   grow,
|   panelRef,
|   ...rest
| }) => {
|

May be someone can help me.
Thank you very much!!!

Can you please check if node_modules are up-to-date? You may need an appropriate loader to handle this. Try re-installing node_modules and see if this error re-occurs.

Cheers
Rashmi

So I run this command:
yarn kbn bootstrap

The current state is: Bootstrapping completed!
Can I run kibana contributing offline ?

I can't get all node_modules because proxy. So I created a kibana repository that has all node_modules in my home. I think it can run.

Yes Now you can start the development server.

yarn start

Now you can point your web browser to https://localhost:5601 and start using Kibana! When running yarn start, Kibana will also log that it is listening on port 5603 due to the base path proxy, but you should still access Kibana on port 5601.

Good luck!
Rashmi

But I still can't run Kibana dev. When Kibana was loading in Chrome, error in my screen: 'Kibana did not load properly. Check the server output for more information.'. And in terminal:
ERROR in ./node_modules/@kbn/ui-framework/src/components/tool_bar/tool_bar_footer.js
Module parse failed: D:\ELK Test\kibana\kibana\node_modules@kbn\ui-framework\src\components\too
l_bar\tool_bar_footer.js Unexpected token (5:56)
You may need an appropriate loader to handle this file type.
| import classNames from 'classnames';
|
| export const KuiToolBarFooter = ({ children, className, ...rest }) => {
| const classes = classNames('kuiToolBarFooter', className);
| return <div className={classes} {...rest}>{children};

ERROR in ./node_modules/@kbn/ui-framework/src/components/tool_bar/tool_bar_footer_section.js
Module parse failed: D:\ELK Test\kibana\kibana\node_modules\@kbn\ui-framework\src\components\too

l_bar\tool_bar_footer_section.js Unexpected token (5:63)
You may need an appropriate loader to handle this file type.
| import classNames from 'classnames';
|
| export const KuiToolBarFooterSection = ({ children, className, ...rest }) => {
| const classes = classNames('kuiToolBarFooterSection', className);
| return <div className={classes} {...rest} >{children};

Thank you very much!!!

I would suggest taking a second look at your Node_modules dir . The problem exists there. You would have to update it and retry. Try it, else I will ping any internal dev tomorrow to look at your issue if the problem still persists.

Cheers
Rashmi

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