Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

"Failed to compile" - Can't resolve './CreateLeagueButton.jsx' #94

Open
emjayess opened this issue Apr 29, 2018 · 4 comments
Open

"Failed to compile" - Can't resolve './CreateLeagueButton.jsx' #94

emjayess opened this issue Apr 29, 2018 · 4 comments

Comments

@emjayess
Copy link

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:

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
@IsaacRaymond
Copy link
Contributor

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

@IsaacRaymond
Copy link
Contributor

If you haven't done so already, join us on Slack! (Check the readme for the link)

@emjayess
Copy link
Author

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?"

l4g-running

@domwakeling
Copy link
Contributor

Crashing error caused by file extension resolved in #95

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants