Skip to content

Error: We don't know what to do with this node type. We were previously a Statement but we can't fit in here? #7177

@damianobarbati

Description

@damianobarbati

I'm reporting an error I get for every React component exported after I upgraded to @babel/*@^7.0.0-beta.37:

ERROR in ./apps/visitor/components/List.js
Module build failed: Error: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?

I already checked this out #7122 where the problem was a version mismatch but it does not seem my case.

Babel config in package.json:

"babel": {
    "presets": [
        [
            "@babel/preset-env",
            {
                "modules": false,
                "useBuiltIns": "usage",
                "debug": true
            }
        ],
        "@babel/preset-stage-0",
        "@babel/preset-react"
    ],
    "plugins": [
        "lodash",
        "@babel/plugin-proposal-decorators",
        [
            "@babel/plugin-proposal-class-properties",
            {
                "loose": true
            }
        ]
    ]
},

Dependencies version:

"devDependencies": {
    "@babel/core": "^7.0.0-beta.37",
    "@babel/plugin-proposal-class-properties": "^7.0.0-beta.37",
    "@babel/plugin-proposal-decorators": "7.0.0-beta.37",
    "@babel/polyfill": "^7.0.0-beta.37",
    "@babel/preset-env": "^7.0.0-beta.37",
    "@babel/preset-react": "^7.0.0-beta.37",
    "@babel/preset-stage-0": "^7.0.0-beta.37",
    "babel-eslint": "8.2.1",
    "babel-jest": "22.0.4",
    "babel-loader": "8.0.0-beta.0",
    "babel-minify-webpack-plugin": "0.2.0",
    "babel-plugin-lodash": "3.3.2",
    ...
}

Thanks for the amazing work on this project as always 💪🏻

Metadata

Metadata

Assignees

No one assigned

    Labels

    Spec: Decorators (Legacy)outdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions