Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble running lesson 8 (supposedly Babel error) #104

Closed
lessthanzero opened this issue Jun 1, 2016 · 5 comments
Closed

Trouble running lesson 8 (supposedly Babel error) #104

lessthanzero opened this issue Jun 1, 2016 · 5 comments

Comments

@lessthanzero
Copy link

Hi! My setup is node 4.4.4 and learnyoureact 0.11.6.

I have trouble running my project in browser starting with lesson 8. Code verifies successfully, but when I try to load page, I constantly get an error (both in 8 and 9 lessons):

learnyoureact-error-8

events.js:141
      throw er; // Unhandled 'error' event
      ^

TypeError: Cannot read property 'error' of undefined while parsing file: /Users/user/Developer/learnyoureact/app.js
    at OptionManager.mergeOptions (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:126:28)
    at OptionManager.addConfig (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:107:10)
    at OptionManager.findConfigs (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:168:35)
    at OptionManager.init (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:12)
    at compile (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:117:22)
    at normalLoader (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:199:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/user/Developer/learnyoureact/node_modules/babel/node_modules/babel-core/lib/api/register/node.js:216:7)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)

Looks like a Babel error, so I've tried to downgrade to babel 5.8.23 from 5.8.38 but to no avail.

Also, when I run npm list I get peer invalid messages:

peer-invalid

├─┬ [email protected] peer invalid
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ ├── [email protected]
│ │ ├─┬ [email protected]
│ │ │ ├─┬ [email protected]
│ │ │ │ ├─┬ [email protected]
│ │ │ │ │ └── [email protected]
│ │ │ │ └── [email protected]
│ │ │ └── [email protected]
│ │ ├─┬ [email protected]
│ │ │ └── [email protected]
│ │ └── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └── [email protected]
└── [email protected] peer invalid

npm ERR! peer invalid: [email protected] /Users/user/Developer/learnyoureact/node_modules/react
npm ERR! peer invalid: [email protected] /Users/user/Developer/learnyoureact/node_modules/react-dom
npm ERR! extraneous: [email protected] /Users/user/Developer/learnyoureact/node_modules/browserify
npm ERR! extraneous: [email protected] /Users/user/Developer/learnyoureact/node_modules/babelify
npm ERR! extraneous: [email protected] /Users/user/Developer/learnyoureact/node_modules/babel-preset-react
npm ERR! extraneous: [email protected] /Users/user/Developer/learnyoureact/node_modules/babel-preset-es2015

Anyone saw something like this? What should I do?

Thanks!

@rvdpeijl
Copy link

+1

@delaguilaluis
Copy link

Had the same problem and solved it by following this suggestion.

@house92
Copy link

house92 commented Dec 23, 2016

I'm seeing the same problem, and wiping my node_modules and reinstalling hasn't fixed it :/ Anybody made any headway with this?

@delaguilaluis
Copy link

Are you using this dependencies versions?

"dependencies": {
    "babel": "^5.8.23",
    "babel-preset-es2015": "^6.1.18",
    "babel-preset-react": "^6.1.18",
    "babelify": "^7.2.0",
    "body-parser": "^1.15.2",
    "browserify": "^13.1.1",
    "express": "^4.14.0",
    "express-react-views": "^0.9.0",
    "react": "^0.14.0",
    "react-dom": "^0.14.0"
  }

@lessthanzero
Copy link
Author

@delaguilaluis worked fine! Thanks

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

No branches or pull requests

4 participants