pi-base / viewer

Web UI for the π-Base
https://topology.pi-base.org
MIT License
9 stars 3 forks source link

Case sensitive filenames break build #39

Closed neldredge closed 4 years ago

neldredge commented 5 years ago

When compiling on Linux, yarn run start emits the following error:

./src/routes.tsx
(9,22): error TS2307: Cannot find module './components/Property'.

It appears that it is looking for src/components/Property/index.tsx but the file in the repository is actually named Index.tsx, with a capital I. Renaming it to index.tsx fixes the error. Then I had to do the same for src/components/Theorem/Index.tsx.

Are you folks developing on a case insensitive OS and so never saw this, or is something else wrong?
I could create a pull request to just git mv the two files, but not sure if that is really the proper fix.

neldredge commented 5 years ago

I noticed that all the other directories have index.tsx so I guess these were just an oversight?

jamesdabbs commented 4 years ago

Hey @neldredge. Sorry, this didn't trigger a notification, and I'm just now seeing it. Just for your reference, we just launched a new version of the viewer; you might be interested in checking out the README. If you happen to get a chance to poke around and have any questions or thoughts, please let us know. (We've got much better notifications set up now.)

To answer your initial question here - definitely an oversight. I think at the time we named the components Index.tsx, I didn't realize there was anything special about importing from index.jss. I'm on a Mac and just overlooked this one because it never blew up. We definitely don't intend to have anything that relies on a case-insensitive filesystem, and consider those a bug.