ReactifyError: Parse Exception

681 views Asked by At

has anyone experienced this error when you run gulp?

i am executing a simple gulpfile.js from egghead.io:

ReactifyError:/Users/Donovan/Desktop/app/react/hotel-app-latest/src/js/fake_8445447f.js: Parse Error: Line 8: Unexpected identifier at throwError (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:2644:21) at throwUnexpected (/Users/Donovan/Desktop/app/react/hotel-app latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:2688:13) at expect (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:2715:13) at parseArguments (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3376:17) at parseLeftHandSideExpressionAllowCall (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3440:24) at parsePostfixExpression (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3476:20) at parseUnaryExpression (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3506:20) at parseBinaryExpression (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3633:16) at parseConditionalExpression (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3693:16) at parseAssignmentExpression (/Users/Donovan/Desktop/app/react/hotel-app-latest/node_modules/reactify/node_modules/jstransform/node_modules/esprima-fb/esprima.js:3932:16)

1

There are 1 answers

1
robskidmore On BEST ANSWER

I had the same error.

I was missing a comma after in the React.renderComponent

Make sure you have this

React.renderComponent(
<APP />,
document.getElementById('main'));

and not this

React.renderComponent(
<APP />
document.getElementById('main'));

It says the error is in the fake_blahdedah.js file but it's probably a syntax error in one of your .js files.

Hope that helps.