babel: Cannot read property 'helpers' of undefined
Hi. I got a following error: ‘Cannot read property ‘helpers’ of undefined.’ Hope anyone can help with that.
Also I got a https://github.com/babel/babel/issues/7110 without “plugins” in my .babelrc.
.babelrc, package.json
{
"presets": [
[
"@babel/preset-env",
{
"targets": {
"browsers": [
"last 2 versions"
]
}
}
]
],
"plugins": [
"@babel/plugin-transform-runtime"
]
}
{
"devDependencies": {
"@babel/cli": "^7.0.0-beta.36",
"@babel/core": "^7.0.0-beta.36",
"@babel/plugin-transform-runtime": "^7.0.0-beta.36",
"@babel/preset-env": "^7.0.0-beta.36"
},
"dependencies": {
"@babel/runtime": "^7.0.0-beta.36"
}
}
Error
Cannot read property 'helpers' of undefined at _default node_modules\@babel\plugin-transform-runtime\lib\index.js:17:25)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (9 by maintainers)
@nicolo-ribaudo I also had tryed to reinstal all my dependencies and after that all is worked fine. Perhaps it’s because I was trying to many solution to solve my issue from the begining and I just had polluted node_modules with different versions of different packages. And parcel just don’t know what to choose or something like that.
@nicolo-ribaudo @xtuc Thanks for you support. Very appreciate.
If you’re using
babel-loader@7
, which is what is automatically installed, along with@babel/core beta
, try usebabel-loader@^8.0.0-beta.0
.Cannot read property ‘helpers’ of undefined with babel and webapck
FYI @swymmwys https://github.com/parcel-bundler/parcel/pull/475
@swymmwys I tested your code with Babel 6 (without using parcel) and it works
Output
I don’t know Parcel so I don’t know what the issue could help. As a workaround, you can include
regenerator-runtime/runtime
in your entry point.