Skip to content

haul init stuck on updating Babel configuration #751

Open

Description

Environment

  • OS: macOS Catalina
  • React Native: 0.63
  • npx: 6.14.5
  • node: 12.12.0

Description

When trying to setup Haul in an existing project, the haul init command gets stuck at the second step (updating Babel config). I believe this may be due to my project using the JSON version of the config via babel.config.json.

Here's the content of my Babel configuration file:

{
    "presets": [
        "module:metro-react-native-babel-preset"
    ],
    "plugins": [
        [
            "module-resolver",
            {
                "root": ["./src"],
                "extensions": [
                    ".ios.ts",
       		    ".android.ts",
		    ".ts",
	            ".ios.tsx",
                    ".android.tsx",
	            ".tsx",
		    ".jsx",
	            ".js",
		    ".json"
                ],
                "alias": {
                    "@assets": "./src/assets",
                    "@components": "./src/components",
                    "@contexts": "./src/contexts",
                    "@env": "./src/env",
                    "@hooks": "./src/hooks",
                    "@layout": "./src/layout",
                    "@lib": "./src/lib",
                    "@localization": "./src/localization",
                    "@models": "./src/models",
                    "@navigation": "./src/navigation",
                    "@network": "./src/network",
                    "@primitives": "./src/primitives",
                    "@screens": "./src/screens",
                    "@scripts": "./src/scripts"
		}
            }
        ]
    ]
}

Reproducible Demo

Create a new React Native app by using react-native init and instead of using the conventional babel.config.js, replace it with babel.config.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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