0

So I cannot for the life of me figure out why one of my developers is getting the following error on her machine? The code works perfectly on my laptop with what would seemingly be the exact same setup. Obviously something must be different, but I haven't found it yet. So whenever we try to run the app on her machine we get the following error. Node is at 6.11.4. I looked at the line of code in the middleware.js file and it points to a call to the Promise() method. As far as I know, that should be defined in this version of node correct? I've uninstalled and reinstalled node 2 times, i've remove the projects node_modules and refreshed them. Any other thoughts?

ReferenceError: Promise is not defined at webpackDevMiddleware (C:\Source\Repos\NTC WEB\NTC.Web.Business\node_modules\webpack-dev-middleware\middleware.js:43:14)

Bryce Martin
  • 129
  • 3
  • 17
  • Promises should already be included. Maybe try installing the es6-promise package. Maybe its an issue of the version of webpackDevMiddleware? – Dream_Cap Oct 22 '17 at 02:22
  • 2
    To double check if it's an issue with missing native `Promise` or not, ask her to run `node -e "Promise.resolve(1).then(e => console.log(e))"`. If there is no error then it's library specific – Balázs Édes Oct 22 '17 at 02:47
  • It's likely that one of the transitive dependencies is doing some monkey (patching) business. Make sure to re-install the dependencies deterministically (with a lockfile) on both machines and then run the app. – Unglückspilz Oct 22 '17 at 12:17
  • @BalázsÉdes - This did return 1. I'll now have to try and shrinkwrap the project on my machine, check it in, and have her pull it down and try it. – Bryce Martin Oct 31 '17 at 11:43

0 Answers0