babel / babelify

Browserify transform for Babel
MIT License
1.68k stars 114 forks source link

TypeError: Cannot read property 'arrayify' of undefined #288

Closed geanfrancovolpe closed 5 years ago

geanfrancovolpe commented 5 years ago

I'm using gsap in my typescript project, and compiling it with gulp + browserify + babelify and throws me this error: TypeError: Cannot read property 'arrayify' of undefined.

these are my dependencies: "@babel/cli": "^7.5.5", "@babel/core": "^7.5.5", "@babel/preset-env": "^7.5.5", "babel-core": "^7.0.0-bridge.0", "babel-preset-es2015": "^6.24.1", "babelify": "^8.0.0"

I've been looking for a solution, and found that arrayify, canCompile utils functions were removed from new babel version, maybe the "babelify" dependency is not updated to not work with these functions?

goto-bus-stop commented 5 years ago

You're using a version of babelify that only works with Babel 6. the latest version, babelify@10, works with babel 7.

You've also got a babel-preset-es2015 in your package.json, which only works with Babel 6; if you are using Babel 7, it should be removed. @babel/preset-env does everything preset-es2015 does and more.

geanfrancovolpe commented 5 years ago

thanks dude you're right, i was configuring the gulp file from the typescript gulp tutorial and is outdated.