FBDevCLagos / hiddenwisdom-react-js

Hidden Wisdom Front End Project
MIT License
4 stars 0 forks source link

Running `npm start` after `npm install` doesn't properly start the server #34

Closed imolorhe closed 7 years ago

imolorhe commented 7 years ago

Hi. So I cloned the repo and installed babel-cli and also ran npm install and then I ran npm start. The server started but with an error

ERROR in ./src/js/index.js Module parse failed: c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\src\js\index.js Unexpected token (17:2)

Also even when the server started and I navigated to the page, it showed a blank page with an error in the JS file. I believe that error is due to the app.get('*', function(req, res) { on line 16 of the distServer.js file, which sends the index.html file for every request.

I don't know if I am missing anything from the setup.

imolorhe commented 7 years ago

The complete error:

ERROR in ./src/js/index.js Module parse failed: c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\src\js\index.js Unexpected token (17:2) You may need an appropriate loader to handle this file type. SyntaxError: Unexpected token (17:2) at Parser.pp$4.raise (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:2221:15) at Parser.pp.unexpected (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:603:10) at Parser.pp$3.parseExprAtom (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1822:12) at Parser.pp$3.parseExprSubscripts (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1715:21) at Parser.pp$3.parseMaybeUnary (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1692:19) at Parser.pp$3.parseExprOps (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1637:21) at Parser.pp$3.parseMaybeConditional (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1620:21) at Parser.pp$3.parseMaybeAssign (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1597:21) at Parser.pp$3.parseExprList (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:2165:22) at Parser.pp$3.parseSubscripts (c:\Users\Sirmuel\Documents\GitHub\hiddenwisdom-react-js\node_modules\acorn\dist\acorn.js:1741:35) @ multi main

akinjide commented 7 years ago

@imolorhe Which github branch is this?

imolorhe commented 7 years ago

That would be the develop branch.

akinjide commented 7 years ago

Thanks @imolorhe I would look into it

akinjide commented 7 years ago
 % npm start

> hiddenwisdom-react-js@ start /Users/akinjide/source/hiddenwisdom-react-js
> npm-run-all --parallel open:src lint:watch

> hiddenwisdom-react-js@ lint:watch /Users/akinjide/source/hiddenwisdom-react-js
> npm run lint -- --watch

> hiddenwisdom-react-js@ open:src /Users/akinjide/source/hiddenwisdom-react-js
> babel-node tools/srcServer.js

> hiddenwisdom-react-js@ lint /Users/akinjide/source/hiddenwisdom-react-js
> esw webpack.config.* src tools --color "--watch"

Listening "🌎" on port 9000. Open up http://127.0.0.0:9000/ in your browser.
✓ Clean (6:32:56 PM)
webpack built 05304adc7c173d85383a in 7288ms

This is what I got when I checkout to the develop branch. Looks fine to me

akinjide commented 7 years ago

@imolorhe Is it okay to close this issue?

imolorhe commented 7 years ago

@andela-abankole Works fine now.