ecatch-kyst / web

IT Bachelor project @ NTNU ⚡🎣
https://ecatch-kyst-beta.firebaseapp.com
GNU General Public License v3.0
5 stars 0 forks source link

🐛 Compile error in develop #61

Closed toretefre closed 5 years ago

toretefre commented 5 years ago

After pulling latest develop (1st of March 11am local time)

Expected Behavior

Build should build

Current Behavior

When visiting localhost:3000, this error is shown:

Build error: in ./src/components/Forms/components/DropdownMap.jsx

Cannot find file: 'dropdown.json' does not match the corresponding name on disk: './src/components/Forms/components/Dropdown.json'.

Possible Solution

Renaming the import in DropdownMap.jsx makes the build compile, but you are then faced with blank page when trying to post departure message.

Steps to Reproduce

  1. git fetch
  2. git checkout develop
  3. git pull
  4. yarn
  5. yarn start

Suggestions

@balazsorban44 suggested that @elfingar may have a fix ready already, is that correct?

elfingar commented 5 years ago

Its probably a difference in operating systems. A quick fix for now is to change the import in InputForms from import Dropdown from './components/Dropdown' to import Dropdown from './components/Dropdown.jsx'. the .jsx should make it compile correctly

toretefre commented 5 years ago

As the import error is with the dropdown.json file and not the dropdown.jsx i'm guessing that the fix won't work. Will investigate some more.

elfingar commented 5 years ago

I checked it, compiled it and it worked :)

toretefre commented 5 years ago

So did I, and it didn't work. Tried just now with the same result.

However, I managed to find a workaround, which was to rename the Dropdown.json file and all references into dropdownlist.json, to avoid the name conflict with Dropdown.jsx.

Will make a PR to develop for this fix, and see if it works for everyone, as this may be an issue only for MacOS users.

Thanks for helping out!

Mortefal commented 5 years ago

Is this done?

balazsorban44 commented 5 years ago

I would wait with it. Working on something, which will affect this anyway.