regenerator icon indicating copy to clipboard operation
regenerator copied to clipboard

regenerator-transform and AVA

Open adamhavel opened this issue 7 years ago • 1 comments

I'm using AVA to test my node modules, transpiling them on the go with babel-register. Until recently, everything worked fine, but now the tests won't run, with the following error: Error: Options {"loose":true} passed to node_modules/babel-preset-es2015/lib/index.js which does not accept options. I've looked into it and after some time I found out the culprit which - for reasons I don't understand - is the regenerator-transform package. If I delete the { "loose": true } from its package.json, the tests start working again. The aforementioned error suggest that somewhere along the chain, older version of babel-preset-es2015 that doesn't support passing options is required. But where and why, I have no idea. In my main project's package.json, I use the latest version (6.18.0) of the preset which supports the options.

adamhavel avatar Dec 28 '16 15:12 adamhavel

I'm having the same issue, except I'm running an even newer version of the es2015 presets:

/local/brazil-pkg-cache/packages/NodeJS-babel-core/NodeJS-babel-core-6.24.x.8.138/RHEL5_64/DEV.STD.PTHREAD/build/lib/commonjs/babel-core/lib/transformation/file/options/option-manager.js:334
        throw e;
        ^

Error: Options {"loose":true} passed to /local/brazil-pkg-cache/packages/NodeJS-babel-preset-es2015/NodeJS-babel-preset-es2015-6.24.x.1.108/RHEL5_64/DEV.STD.PTHREAD/build/lib/commonjs/babel-preset-es2015/lib/index.js which does not accept options. (While processing preset: "/local/brazil-pkg-cache/packages/NodeJS-babel-preset-es2015/NodeJS-babel-preset-es2015-6.24.x.1.108/RHEL5_64/DEV.STD.PTHREAD/build/lib/commonjs/babel-preset-es2015/lib/index.js") (While processing preset: "/local/brazil-pkg-cache/packages/NodeJS-babel-preset-es2015/NodeJS-babel-preset-es2015-6.24.x.1.108/RHEL5_64/DEV.STD.PTHREAD/build/lib/commonjs/babel-preset-es2015/lib/index.js")

As @adamhavel suggested, this is caused by this package setting {"loose": true} in it's package.json. I really don't know how to deal with this because I can't just remove it from that file.

jakubgs avatar Sep 19 '17 16:09 jakubgs