Skip to content

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

@Hahlh

Description

@Hahlh
[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions