coryhouse / pluralsight-redux-starter

Completed Dev Environment for "Building Applications with React and Redux" on Pluralsight
https://app.pluralsight.com/library/courses/react-redux-react-router-es6/
1.27k stars 914 forks source link

run eslint error #55

Closed leo-le-07 closed 7 years ago

leo-le-07 commented 7 years ago

Node version: v7.8.0

npm version: 4.5.0

Operating system: OSX El Capitan V 10.11.6

Command line used: npm run lint

Steps to reproduce: I'm in Setup ESLint lesson.

Error message:

> pluralsight-redux-starter@1.0.0 lint /Users/leo/dev/react/coryhouse-exp
> esw webpack.config.* src tools

/Users/leo/dev/react/coryhouse-exp/webpack.config.dev.js (1/0)
  ✖  1:1  Parsing error: The keyword 'import' is reserved

/Users/leo/dev/react/coryhouse-exp/tools/srcServer.js (1/0)
  ✖  1:1  Parsing error: The keyword 'import' is reserved

/Users/leo/dev/react/coryhouse-exp/tools/startMessage.js (1/0)
  ✖  1:1  Parsing error: The keyword 'import' is reserved

✖ 3 errors (6:08:42 AM)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pluralsight-redux-starter@1.0.0 lint: `esw webpack.config.* src tools`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pluralsight-redux-starter@1.0.0 lint script 'esw webpack.config.* src tools'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the pluralsight-redux-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     esw webpack.config.* src tools
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs pluralsight-redux-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls pluralsight-redux-starter
npm ERR! There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/leo/.npm/_logs/2017-04-19T23_08_42_666Z-debug.log
coryhouse commented 7 years ago

Please review this list: https://github.com/coryhouse/pluralsight-redux-starter#having-issues-try-these-things-first

Report back if that doesn't fix it.

zeegeek commented 7 years ago

I had the same issue after running "npm install eslint-watch@2.1.13" the error was gone.

SpartaSixZero commented 7 years ago

Hi Cory, love your courses! I've taken the React-Flux course before this course and thoroughly enjoyed it. I'm experiencing the same error when I run

npm run build

Output:

> pluralsight-redux-starter@1.0.0 lint /Users/ms030441/Documents/education/react/redux-pluralsight
> esw webpack.config.* src tools

/Users/ms030441/Documents/education/react/redux-pluralsight/src/index.js (1/0)
  ✖  4:8  No default export found in module  import/default

✖ 1 error (8:46:55 PM)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pluralsight-redux-starter@1.0.0 lint: `esw webpack.config.* src tools`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pluralsight-redux-starter@1.0.0 lint script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ms030441/.npm/_logs/2017-06-15T00_46_55_298Z-debug.log
ERROR: lint: None-Zero Exit(1);
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pluralsight-redux-starter@1.0.0 prebuild: `npm-run-all clean-dist test lint build:html`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pluralsight-redux-starter@1.0.0 prebuild script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ms030441/.npm/_logs/2017-06-15T00_46_55_334Z-debug.log

Node: v6.11.0 NPM: 5.0.3 OS: macOS Sierra 10.12.5

I've went through the troubleshooting steps in your above link including deleting node_modules directory and re-running npm install

However, I still see the same error after running npm run build

coryhouse commented 7 years ago

Thanks @SpartaSixZero! Does this issue occur for you with the final course exercise?

Have you tried installing the latest version of eslint-watch to see if that resolves?

SpartaSixZero commented 7 years ago

Thanks Cory for your fast response!

Found out my error. I did not put the following line at the top of the file. /*eslint-disable import/default*/

It was actually sandwiched between two of my imports and I just didn't realize that until now. Everything works perfectly!

coryhouse commented 7 years ago

Great to hear!