These are my dependencies in package.json :
"devDependencies": {
"babel-cli": "^6.24.1",
"babel-polyfill": "^6.23.0",
"babel-preset-env": "^1.6.0",
"babel-preset-stage-0": "^6.5.0",
}
I can compile just fine with "babel server -d transpiled" (I have everything in a server folder instead of src).
The problem occurs when I try to run the transpiled code with "node transpiled/index.js". I get
ReferenceError: regeneratorRuntime is not defined
I did some searching and it seemed that the issue was that I don't have babel-polyfill when using await/async, but I actually do.
Here is my index.js file
require('babel-polyfill');
require('./server');
Here is also my .babelrc file
{
"presets": ["env", "stage-0"]
}
What exactly is going on and why am I getting this error? I already have babel-polyfill so this shouldn't be happening.