Material-ui-pickers: Can't resolve 'react-event-listener'

Created on 7 Jun 2018  路  9Comments  路  Source: mui-org/material-ui-pickers

Environment

| Tech | Version |
|---------------------|---------|
| material-ui-pickers | 1.0.0-rc.9 |
| material-ui | 1.2 |
| React | 16.3 |
| Browser | Chrome Latest |
| Platform | |

Steps to reproduce

  1. npm run build

Expected behavior


The build to pass

Actual behavior


I've gotten all the rest of this issues fixed, except this one.

ERROR in ./node_modules/material-ui-pickers/DatePicker/Calendar.js
    Module not found: Error: Can't resolve 'react-event-listener' in 'C:\Projects\Work\PROJ\src\node_modules\material-ui-pickers\DatePicker'
     @ ./node_modules/material-ui-pickers/DatePicker/Calendar.js 40:26-57
ERROR in ./node_modules/material-ui-pickers/_shared/ModalDialog.js
    Module not found: Error: Can't resolve 'react-event-listener' in 'C:\Projects\Work\PROJ\src\node_modules\material-ui-pickers\_shared'
     @ ./node_modules/material-ui-pickers/_shared/ModalDialog.js 32:26-57

I see the imports in these two files:

https://github.com/dmtrKovalenko/material-ui-pickers/search?q=react-event-listener&unscoped_q=react-event-listener

Yet I see no dependency on it in the package.json, am I missing something?

Live example

important

Most helpful comment

I found the reason!
We will fix it in the next release, please do npm i react-event-listener for now

All 9 comments

+1

Ha. It was included as dependency in material ui

That's weird. I had to include it myself.
Ok, no big deal.

Yeah, I had to too, strange

@dmtrKovalenko Why did you closed the issue, is it fixed?

Still have Module not found: Can't resolve 'react-event-listener' error, and still have to add react-event-listener dependency to my project.

I found the reason!
We will fix it in the next release, please do npm i react-event-listener for now

Closed because this was fixed in the previous release :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danmce picture danmce  路  3Comments

nicky-dev picture nicky-dev  路  3Comments

killjoy2013 picture killjoy2013  路  3Comments

katy6514 picture katy6514  路  3Comments

basselAhmed picture basselAhmed  路  3Comments