"Failed to compile" - Can't resolve './CreateLeagueButton.jsx'
Opened this issue · 4 comments
Hi. I'm brand new to the project, or brand new to wanting to explore the project; but I cloned it yesterday, and failed to get it up and running...
Steps I followed:
- Cloned
master
@28f8e33
on 4/28/2018. - Added
.env
to project... - Per Readme, added environment vars to
.env
(and provisioned Google+ Api) npm install
npm run dev
Asciicast of terminal output:
- https://asciinema.org/a/178982
- Notably, this error?
ERROR in ./client/src/components/create_league/CreateLeagueSelector.jsx
Module not found: Error: Can't resolve './CreateLeagueButton.jsx' in '/Users/emjayess/Sources/freeCodeCamp/league-for-good/client/src/components/create_league'
@ ./client/src/components/create_league/CreateLeagueSelector.jsx 17:26-61
@ ./client/src/components/create_league/CreateLeagueForm.jsx
@ ./client/src/components/Content.jsx
@ ./client/src/app.jsx
@ ./client/index.js
Hey!
You'll get a few of these errors I think - Just go into your files and change all import statements to "CreateLeagueButton.js". For example: components/create_league/CreateLeagueSelector.jsx, should now import "CreateLeagueButton.js" instead of jsx
Just a small glitch that was recently pushed
If you haven't done so already, join us on Slack! (Check the readme for the link)
You'll get a few of these errors I think - Just go into your files and change all import statements to "CreateLeagueButton.js". For example: components/create_league/CreateLeagueSelector.jsx, should now import "CreateLeagueButton.js" instead of jsx
Indeed, I did this just before popping back in here and seeing your matching advice...
--- a/client/src/components/create_league/CreateLeagueSelector.jsx
+++ b/client/src/components/create_league/CreateLeagueSelector.jsx
@@ -5,7 +5,7 @@ import {
CardActions,
CardTitle
} from 'material-ui/Card';
-import CreateLeagueButton from './CreateLeagueButton.jsx';
+import CreateLeagueButton from './CreateLeagueButton';
Aaannd, that works 👍 it just caught me off guard, like "why would I alone be experiencing this... was I missing something in the build toolchain?"
Crashing error caused by file extension resolved in #95