meinstein / react-file-picker

Sensible file input wrappers. Demo included.
19 stars 15 forks source link

Issue on running test with create-react-app. #3

Closed luchoct closed 6 years ago

luchoct commented 6 years ago

Hi @meinstein, thanks for your library. So far, it's great.

I am using react-file-picker with create-react-app, but on running npm test, I get the following error:

Cannot find module 'react-file-picker' from XXX.js

package.json

  "dependencies": {
...
    "react-file-picker": "0.0.5",
    "react-scripts": "1.1.4",
...
  },

I only experience this problem on running tests script (npm start is working fine), and the only dependency that fails is react-file-picker dependency, so not sure if this issue is due to the lack of compatibility of react-file-picker with jest moduleNameMapper configuration in react-scripts.

As I mentioned, library is working perfectly, so I would hate to move into another library, just because all tests on files importing the module are failing.

Could you provide some insight?