ember-codemods / ember-native-class-codemod

A codemod-cli project for converting Ember objects to es6 native classes
68 stars 38 forks source link

Class private methods are not enabled. Please add `@babel/plugin-transform-private-methods` to your configuration #541

Closed mcfiredrill closed 7 months ago

mcfiredrill commented 8 months ago

Getting this error when running the codemod.

  SyntaxError: /repos/dev/ember-cli-apps/engines/interstitial/node_modules/cosmiconfig/dist/Explorer.js: Class private methods are
 not enabled. Please add `@babel/plugin-transform-private-methods` to your configuration.                                                         
  73 |         return await search();                                                                                                             
  74 |     }                                                                                                                                      
> 75 |     async #readConfiguration(filepath) {                                                                                                   
     |     ^                                                             
  76 |         const contents = await promises_1.default.readFile(filepath, { encoding: 'utf-8' });                                               
  77 |         return this.toCosmiconfigResult(filepath, await this.#loadConfiguration(filepath, contents));                                      
  78 |     }                                                                                                                                      

Saw someone in the discord having the same issue and maybe started working on a PR but I'm not sure:

https://discord.com/channels/480462759797063690/597043084588613642/1150882513292628028

Sinled commented 8 months ago

Also have this problem

gnucifer commented 8 months ago

Same here.

krisswiltshire30 commented 8 months ago

Same problem here