ES6 Classes with Decorators causes errors
Alonski opened this issue · 3 comments
Alonski commented
Trying to transform ES6 Classes with Decorators results in this error in the terminal:
ERR app/components/data-loader.js Transformation error (This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (7:4))
SyntaxError: This experimental syntax requires enabling one of the following parser plugin(s): 'decorators-legacy, decorators' (7:4)
at Object.raise (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:6344:17)
at Object.expectOnePlugin (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:7674:18)
at Object.parseDecorator (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:9970:10)
at withTopicForbiddingContext (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:10574:32)
at Object.withTopicForbiddingContext (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:9683:14)
at Object.parseClassBody (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:10563:10)
at Object.parseClass (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:10537:22)
at Object.parseExportDefaultExpression (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:10962:19)
at Object.parseExport (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:10868:31)
at Object.parseStatementContent (C:\Users\Alon\AppData\Roaming\npm-cache\_npx\24140\node_modules\es5-getter-ember-codemod\node_modules\@babel\parser\lib\index.js:9892:27)```
iamareebjamal commented
Facing same issue
simonihmig commented
Will be fixed by #29
pdud commented
Thank you! It ran for me!
Until merged, Simon's code can be run with
npx github:simonihmig/es5-getter-ember-codemod#update-codemod-cli es5-getter-ember-codemod app/**/*.js