coryhouse / react-flux-starter-kit

Quickly get started with React and Flux using Browserify and Gulp
682 stars 247 forks source link

Cannot find module 'eslint-config-defaults/configurations/eslint' #7

Closed Azadehkhojandi closed 8 years ago

Azadehkhojandi commented 8 years ago

Hi Cory,

I'm following your plural sight course step by step and I got into the following issue.

C:\lab\React\node_modules\eslint\lib\config.js:129 throw e; ^

Error: Cannot find module 'eslint-config-defaults/configurations/eslint' Referenced from: C:\Users\azi.eslintrc at Function.Module._resolveFilename (module.js:326:15) at Function.Module._load (module.js:277:25) at Module.require (module.js:354:17) at require (internal/module.js:12:17) at loadConfig (C:\lab\React\node_modules\eslint\lib\config.js:96:48) at C:\lab\React\node_modules\eslint\lib\config.js:123:46 at Array.reduceRight (native) at loadConfig (C:\lab\React\node_modules\eslint\lib\config.js:111:36) at getPersonalConfig (C:\lab\React\node_modules\eslint\lib\config.js:194:18) at getLocalConfig (C:\lab\React\node_modules\eslint\lib\config.js:238:55)

It seems running npm install --save gulp-eslint@0.15.0 is it not enough I installed the following packages npm install --save eslint eslint-config-defaults eslint-plugin-react babel-eslint and now I'm getting

C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\eslint.js:642 throw ex; ^

TypeError: Error while loading rule 'react/display-name': ruleCreator is not a function at C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\eslint.js:628:32 at Array.forEach (native) at EventEmitter.module.exports.api.verify (C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\eslint.js:619:16) at processText (C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\cli-engine.js:201:27) at CLIEngine.executeOnText (C:\lab\React\node_modules\gulp-eslint\node_modules\eslint\lib\cli-engine.js:361:26) at verify (C:\lab\React\node_modules\gulp-eslint\index.js:19:17) at Transform._transform (C:\lab\React\node_modules\gulp-eslint\index.js:37:18) at Transform._read (_stream_transform.js:167:10) at Transform._write (_stream_transform.js:155:12) at doWrite (_stream_writable.js:292:12)

Cheers, Az

coryhouse commented 8 years ago

Closing since discussing on course site.

coryhouse commented 7 years ago

See #9 for discussion on this.

klauszhang commented 7 years ago

Hello @Azadehkhojandi im using

"gulp-eslint": "^3.0.1",    
"gulp": "^3.9.1",

For me, do following can solve the problem. In gulpfile.js
change

lint({ config: 'eslint.config.json' })

into

lint({ configFile: 'eslint.config.json' })
coryhouse commented 7 years ago

@klauszhang - Thanks! If you want to see an example of the demo uses all the latest versions of the libraries used in the course, go here: (https://github.com/coryhouse/react-flux-building-applications/tree/update)