StephenGrider / ReduxSimpleStarter

Starter pack for an awesome Udemy course
MIT License
3.56k stars 4.63k forks source link

when i load localhost:8080 keep getting this error ReferenceError: Promise is not defined #198

Closed shilpashreejr closed 6 years ago

shilpashreejr commented 6 years ago

I am a udemy student, npm start says compiled successfully, but loaclhost:8080 doesnt load the page. keeps throwing an error


    at webpackDevMiddleware (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/webpack-dev-middleware/middleware.js:43:14)
    at Layer.handle [as handle_request] (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/layer.js:95:5)
    at trim_prefix (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/index.js:317:13)
    at /Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/index.js:284:7
    at Function.process_params (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/index.js:335:12)
    at next (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/index.js:275:10)
    at next (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/route.js:127:14)
    at next (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/route.js:131:14)
    at next (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/route.js:131:14)
    at next (/Users/shilpa/Developer/react/ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/express/lib/router/route.js:131:14) ```
shilpashreejr commented 6 years ago

Fixed this issue by installing es6-promise npm package and added this line

var Promise = require('es6-promise');

in

ReduxSimpleStarter/node_modules/webpack-dev-server/node_modules/webpack-dev-middleware/middleware.js