StephenGrider / ReduxSimpleStarter

Starter pack for an awesome Udemy course

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm start won't work

ahmed-am opened this issue · comments

Hi, I cloned the repo and did npm install and npm start, following error shows when I run npm start

Users\ahmed\Documents\Coding\WebDevelopment\React and Redux\reduxsimplestarter\webpack.config.js:25
port: 3030
^^^^

SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at module.exports (C:\Users\ahmed\Documents\Coding\WebDevelopment\React and Redux\reduxsimplestarter\node_modules\webpack\bin\convert-argv.js:80:13)

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "start"
npm ERR! node v6.11.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! redux-simple-starter@1.0.0 start: node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the redux-simple-starter@1.0.0 start script 'node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js'.
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 redux-simple-starter package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs redux-simple-starter
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls redux-simple-starter
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ahmed\Documents\Coding\WebDevelopment\React and Redux\reduxsimplestarter\npm-debug.log

Hi there just stopping in to say I am having the same issues. Will update if I can find a way to fix.

Please try running npm update and letting me know if your issue resolves

I tried that and it didn't work.
Did that work for you? I might try reinstalling node if so

Yeah that solved the issue for me. I'm sorry to hear it didn't work for you too!

Hi there, I am having the same issues on the Windows 10. I have tried to run npm update but it didn't work at all.
Please help me!

Hello there... add this to your webpack.config file it worked for me

devServer: {
port: 3000
},

Ok, it worked for me now! there was a very small problem for me which I figured thanks to @mlg-hub.

So, I had the devServer piece of code all well.... I just forgot the ',' (comma) at the end of it.

It might be helpful for others having similar issues to check for similar issues (missing commas etc.)

Pasting my webpack.config.js code below just in case anyone needs it

module.exports = { entry: [ './src/index.js' ], output: { path: __dirname, publicPath: '/', filename: 'bundle.js' }, module: { loaders: [{ exclude: /node_modules/, loader: 'babel', query: { presets: ['react', 'es2015', 'stage-1'] } }] }, resolve: { extensions: ['', '.js', '.jsx'] }, devServer: { port: 3000 }, };

Thanks to @mlg-hub.
It works for me too.

me it was not install properly , $npm install // do the tricks