complete-intro-to-react icon indicating copy to clipboard operation
complete-intro-to-react copied to clipboard

Errors on Windows

Open alexwebbb opened this issue 7 years ago • 3 comments

I get a like 3000+ errors when ESlint runs, lint -- --fix reduces it to like 84 errors

Running Windows 10, my other react apps work just fine.

A small portion of the result of running webpack afterwards

 @ ./js/Search.jsx 16:16-37
 @ ./js/App.jsx
 @ ./js/ClientApp.jsx
 @ multi ./js/ClientApp.jsx ./js/ClientApp.js ./public/bundle.js

ERROR in ./js/Header.jsx

C:\Users\alexw\Source\complete-intro-to-react\js\Header.jsx
  8:22  error  Parsing error: Unexpected token :

✖ 1 problem (1 error, 0 warnings)

 @ ./js/Search.jsx 20:14-33
 @ ./js/App.jsx
 @ ./js/ClientApp.jsx
 @ multi ./js/ClientApp.jsx ./js/ClientApp.js ./public/bundle.js

ERROR in ./js/reducers.js

C:\Users\alexw\Source\complete-intro-to-react\js\reducers.js
  6:39  error  Parsing error: Unexpected token :

✖ 1 problem (1 error, 0 warnings)

 @ ./js/store.js 17:16-37
 @ ./js/App.jsx
 @ ./js/ClientApp.jsx
 @ multi ./js/ClientApp.jsx ./js/ClientApp.js ./public/bundle.js

C:\Users\alexw\Source\complete-intro-to-react>

alexwebbb avatar Jul 09 '17 21:07 alexwebbb

When you see those unexpected token errors, it's often because babel isn't loading the correct plugins or they're being loaded in the correct order. It seems to me that, for some reason the "env" preset that loads the es2015 plugin isn't ever being loaded on Windows. I still haven't been able to figure out how it's working elsewhere.

gpspake avatar Jul 10 '17 17:07 gpspake

I ended up continuing this course by running it in a create-react-app project. Everything works if you just keep everything in the source folder and be sure to export an App component as the root component at some point

alexwebbb avatar Jul 16 '17 22:07 alexwebbb

extremely puzzled to find "//" comments in the css file

alexwebbb avatar Jul 17 '17 19:07 alexwebbb