React-admin: in ra-ui-materialui there are Filter and filter import, which triggers a warning

Created on 11 Aug 2020  路  5Comments  路  Source: marmelab/react-admin

What you were expecting:

I don't get a warning when importing react-admin

What happened instead:

I get this warning:

./node_modules/ra-ui-materialui/esm/list/Filter.js
There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* /path/to/project/node_modules/ra-ui-materialui/esm/list/Filter.js
    Used by 2 module(s), i. e.
    /path/to/project/node_modules/ra-ui-materialui/esm/list/index.js
* /path/to/project/node_modules/ra-ui-materialui/esm/list/filter.js
    Used by 2 module(s), i. e.
    /path/to/project/node_modules/ra-ui-materialui/esm/list/index.js

Steps to reproduce:

I did not find out what triggers that warning (nextjs or typescript), but both were updated to latest version.

Related code:

Its obvious why this happens. There is a file named Filter and a folder named filter, which seems to trigger a warning.

Other information:

Environment

  • React-admin version: 3.8.0
  • Last version that did not exhibit the issue (if applicable):
  • React version: 16.13.1

  • typescript: 3.9.7

  • nextjs: 9.5.2
bug

Most helpful comment

Seems like related, caught similar error while migrating from 2.9.9 to 3.x. Pulled 3.8.0 and webpack refuses to compile project with the following error:

./node_modules/ra-ui-materialui/esm/list/index.js
Cannot find file: 'filter.js' does not match the corresponding name on disk: '.\node_modules\ra-ui-materialui\esm\list\Filter.js'.

Not sure if reproduce-able, but there you have it. Would be nice if it fixes itself with above PR.

All 5 comments

Damn, you're right. It should be an easy fix (moving Filter inside filter/)

Seems like related, caught similar error while migrating from 2.9.9 to 3.x. Pulled 3.8.0 and webpack refuses to compile project with the following error:

./node_modules/ra-ui-materialui/esm/list/index.js
Cannot find file: 'filter.js' does not match the corresponding name on disk: '.\node_modules\ra-ui-materialui\esm\list\Filter.js'.

Not sure if reproduce-able, but there you have it. Would be nice if it fixes itself with above PR.

Do you have any plan to release this fix? Because without it, users cannot even start the app with development mode.

We'll release it shortly

There you go, 3.8.1 is published on npm.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

marknelissen picture marknelissen  路  3Comments

samanmohamadi picture samanmohamadi  路  3Comments

9747749366 picture 9747749366  路  3Comments

rkyrychuk picture rkyrychuk  路  3Comments

kdabir picture kdabir  路  3Comments