developit / express-es6-rest-api

:battery: Starter project for an ES6 RESTful Express API.
http://git.io/express-es6-rest-api
MIT License
2.46k stars 552 forks source link

Fix "regeneratorRuntime is not defined" error #41

Open yossi-shasho opened 6 years ago

yossi-shasho commented 6 years ago

This fixes the following error, which occurs when running $ npm start after $ npm run build:

ReferenceError: regeneratorRuntime is not defined
    at ...
    at Module._compile (module.js:641:30)
    at Object.Module._extensions..js (module.js:652:10)
    at Module.load (module.js:560:32)
    at tryModuleLoad (module.js:503:12)
    at Function.Module._load (module.js:495:3)
    at Module.require (module.js:585:17)
    at require (internal/module.js:11:18)
saeta-eth commented 6 years ago

Hi @yossi-shasho!

I had the same problem as you. I solved it using your solution but you should runnpm run babel-polyfill --save-dev, to find this module in package.json.