Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React Native error: [BABEL] unknown: Preset /* your preset */ requires a filename to be set when babel is called directly. #165

Open
Hahlh opened this issue Jun 2, 2022 · 1 comment

Comments

@Hahlh
Copy link

Hahlh commented Jun 2, 2022

[BABEL] unknown: Preset /* your preset */ requires a filename to be set when babel is called directly,

`babel.transform(code, { filename: 'file.ts', presets: [/* your preset */] });`

See https://babeljs.io/docs/en/options#filename for more information.

This error occurs when trying to extract a component to a file. A filename was specified and the extension works as expected with React in general.

@azuramazlan9
Copy link

In.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants