You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a file with a Stage 3 decorator that trying to access context.kind (second argument of a decorator)
Wrap some class with it
Try to load config with it, receive error TypeError: Cannot read properties of undefined (reading 'kind')
Try to add Babel plugin into transformOptions.babel.plugins, try again. Observe the same error
Describe the bug
My project uses latest Stage 3 Decorators proposal in our codebase, and we found that c12 uses jiti to load config. We tried to pass babel.plugins: ["@babel/plugin-proposal-decorators", { "version": "2023-11" }], but without any luck. It ends on the end of a list, so previous transformations already tried to convert code with legacy decorators.
Additional context
I've tried to load the config with just jiti, this is how I found that the error is in jiti setup. Patching c12 or @better-auth/cli doesn't provide any benefit
Logs
The text was updated successfully, but these errors were encountered:
Sorry, wrong error. After running without cache, I've received error:
[Error: undefined: Cannot use the decorators and decorators-legacy plugin together
It seems that [proposalDecoratorsPlugin, { legacy: true }] and babel-plugin-parameter-decorator is the problem, and it's impossible to disable it outside
Environment
@better-auth/cli -> c12 -> jiti
Node 22.14.0
Reproduction
TypeError: Cannot read properties of undefined (reading 'kind')
Describe the bug
My project uses latest Stage 3 Decorators proposal in our codebase, and we found that
c12
uses jiti to load config. We tried to passbabel.plugins
: ["@babel/plugin-proposal-decorators", { "version": "2023-11" }], but without any luck. It ends on the end of a list, so previous transformations already tried to convert code with legacy decorators.Additional context
I've tried to load the config with just jiti, this is how I found that the error is in jiti setup. Patching c12 or @better-auth/cli doesn't provide any benefit
Logs
The text was updated successfully, but these errors were encountered: