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

Cannot find module 'react-datapicker' #1602

Closed
martijnrondeel opened this issue Feb 26, 2019 · 2 comments
Closed

Cannot find module 'react-datapicker' #1602

martijnrondeel opened this issue Feb 26, 2019 · 2 comments

Comments

@martijnrondeel
Copy link
Contributor

I'm using EUI 8.0.0 in my Kibana plugin. When I try to yarn build the plugin I get the following error:

yarn run v1.13.0
$ plugin-helpers build
Task "build" failed:

Error: Command failed: /home/martijn/Repos/kibana-extra/bitface-plugin/node_modules/.bin/tsc --pretty true

node_modules/@elastic/eui/eui.d.ts:915:56 - error TS2307: Cannot find module 'react-datepicker'.

915  import ReactDatePicker, { ReactDatePickerProps } from 'react-datepicker';
                                                           ~~~~~~~~~~~~~~~~~~


Found 1 error.


    at makeError (/home/martijn/Repos/kibana/node_modules/execa/index.js:174:9)
    at Function.module.exports.sync (/home/martijn/Repos/kibana/node_modules/execa/index.js:338:15)
    at /home/martijn/Repos/kibana/packages/kbn-plugin-helpers/tasks/build/create_build.js:147:13
    at process._tickCallback (internal/process/next_tick.js:68:7)
error Command failed with exit code 1.

I see @elastic/datemath and moment are required, is react-datepicker a dependency that needs to be installed too?

@jasonrhodes
Copy link
Member

@martijnrondeel yeah, we forgot to include the types package as a peer dep. For now, you can install @types/[email protected] to solve this for yourself. We have a ticket to solve it better for everyone here: #1607

Sorry about that!

@martijnrondeel
Copy link
Contributor Author

@jasonrhodes That works, thank you for looking into this!

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

3 participants