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

Babel error: babel program.body[13].declarations[0].init.arguments[0].expressions[1].b #461

Closed
bbest123 opened this issue Jun 9, 2017 · 4 comments

Comments

@bbest123
Copy link

bbest123 commented Jun 9, 2017

I am seeing the below babel error when starting my nodejs app in one of the unix box. Any idea when the below error would show up?

The same code works fine on my mac.

babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression.callee.property Identifier: Recursing into... +0ms babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression.callee.property Identifier: exit +0ms babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression.callee MemberExpression: exit +0ms babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression.arguments[0] ThisExpression: enter +0ms babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression.arguments[0] ThisExpression: Recursing into... +0ms babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression.arguments[0] ThisExpression: exit +0ms babel program.body[13].declarations[0].init.arguments[0].expressions[1].body.body[6].body.body[4].argument.children[5].children[1].expression.alternate.openingElement.attributes[0].value.expression CallExpression: exit +0ms

My babelrc:


{
  "presets": [
    "es2015"
  ],
  "ignore": [
    "node_modules/**/*.js"
  ],
  "env": {
    "development": {
      "plugins": [
        "transform-decorators-legacy"
      ],
      "presets": [
        "react-optimize",
        "react",
        "es2015",
        "stage-1"
      ]
    },
    "production": {
      "plugins": [
        "transform-react-remove-prop-types",
        "transform-react-constant-elements",
        "transform-react-inline-elements",
        "transform-decorators-legacy"
      ],
      "presets": [
        "react-optimize",
        "react",
        "es2015",
        "stage-1"
      ]
    },
    "test": {
      "plugins": [
        "transform-decorators-legacy"
      ],
      "presets": [
        "react-optimize",
        "react",
        "es2015",
        "stage-1"
      ]
    }
  }
}

webpack config:

module: {
        loaders: PROD ? [
                {
                    test: /\.(js|jsx)$/,
                    include: [path.join(__dirname, 'common'), path.join(__dirname, 'client')],
                    exclude: /node_modules/,
                    loader: 'babel',
                    query: {
                        cacheDirectory: true,
                        presets: ["es2015", "react", "react-optimize"],
                        plugins: [["transform-react-constant-elements"],
                            ["transform-react-inline-elements"],
                            ['transform-object-rest-spread'],
                            ['transform-class-properties'],
                            ["transform-decorators-legacy"],
                            ["transform-runtime"]
                        ],
                    }
                },
            ] : [
                {
                    test: /\.(js|jsx)$/,
                    include: __dirname,
                    exclude: /(node_modules)/,
                    loader: 'babel',
                    query: {
                        cacheDirectory: true,
                        presets: ["es2015", "react", "react-optimize"],
                        plugins: [["transform-react-constant-elements"],
                            ["transform-react-inline-elements"],
                            ['transform-object-rest-spread'],
                            ['transform-class-properties'],
                            ["transform-decorators-legacy"],
                            ["transform-runtime"],
                            ['react-transform', {
                                transforms: [
                                    {
                                        transform: 'react-transform-hmr',
                                        imports: ['react'],
                                        locals: ['module'],
                                    }, {
                                        transform: 'react-transform-catch-errors',
                                        imports: ['react', 'redbox-react'],
                                    },
                                ],
                            }],
                        ],
                    }
                },
            ]
    }

package.json

"devDependencies": {
    "babel-core": "6.14.0",
    "babel-eslint": "4.1.5",
    "babel-jest": "18.0.0",
    "babel-loader": "6.2.5",
    "babel-plugin-react-transform": "2.0.2",
    "babel-plugin-transform-class-properties": "6.23.0",
    "babel-plugin-transform-decorators-legacy": "1.3.4",
    "babel-plugin-transform-object-rest-spread": "6.23.0",
    "babel-plugin-transform-react-constant-elements": "6.23.0",
    "babel-plugin-transform-react-inline-elements": "6.22.0",
    "babel-plugin-transform-react-remove-prop-types": "^0.3.3",
    "babel-plugin-transform-runtime": "6.15.0",
    "babel-polyfill": "6.13.0",
    "babel-preset-es2015": "6.14.0",
    "babel-preset-react": "6.5.0",
    "babel-preset-react-optimize": "1.0.1",
    "babel-preset-stage-0": "6.5.0",
    "babel-preset-stage-1": "6.16.0",
    "babel-runtime": "6.11.6",
    "babili": "0.0.12",
    "babili-webpack-plugin": "0.0.11",
    "chai": "3.5.0",
    "clean-webpack-plugin": "^0.1.16",
    "compression-webpack-plugin": "0.3.2",
    "css-loader": "0.27.3",
@bbest123 bbest123 closed this as completed Jun 9, 2017
@bbest123 bbest123 reopened this Jun 9, 2017
@loganfsmyth
Copy link
Member

That output is from DEBUG, it doesn't appear to be an error. Are you potentially setting the DEBUG=* environment variable on that box for some reason?

@bbest123
Copy link
Author

That was the issue. Thanks Logan.

@vivekparekh8
Copy link

vivekparekh8 commented Oct 10, 2018

where was DEBUG=* set ? @bbarani

@SpeedOfSpin
Copy link

I had the same issue and I had it set in the .ENV file

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

4 participants