facebookarchive / fixed-data-table

A React table component designed to allow presenting thousands of rows of data.
http://facebook.github.io/fixed-data-table/
Other
4.3k stars 553 forks source link

Error compiling with webpack #452

Open davidtzoor opened 8 years ago

davidtzoor commented 8 years ago

I tried using fixed-data-table with webpack, and I get the following warning when building my application:

WARNING in ./~/fixed-data-table/internal/React.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

WARNING in ./~/fixed-data-table/internal/react.js
There is another module with an equal name when case is ignored.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Rename module if multiple modules are expected or use equal casing if one module is expected.

Whenever I import fixed-data-table as follows: import {Table, Column, Cell} from 'fixed-data-table'; I get the following error in the browser: Uncaught TypeError: Cannot read property 'number' of undefined in the Scrollbar.react.js:48 file, which is using React.PropTypes.Number: contentSize: PropTypes.number.isRequired

Any idea what this is happening? I don't have issues building other packages using webpack, including React.

KamranAsif commented 8 years ago

We have a fork that is compiled via webpack https://github.com/schrodinger/fixed-data-table-2

We also have bug fixes, new features, better documentation, etc.

davidtzoor commented 8 years ago

Thanks! Do you know why this is happening? It seems as though it doesn't import react well.

KamranAsif commented 8 years ago

React is only listed as a peer dependency, so I think it tries to avoid compiling using the React stub as a placeholder for the imports. I think you might be importing react as 'React' somewhere in your code causing a conflict