electron-compile icon indicating copy to clipboard operation
electron-compile copied to clipboard

TypeError: Cannot use 'in' operator to search for 'name' in undefined

Open caoer opened this issue 8 years ago • 0 comments

the babel setting in my package.json is following:

"babel": {
    "presets": [
      [
        "latest",
        {
          "es2015": {
            "modules": false
          }
        }
      ],
      "react",
      "stage-0"
    ],
    "env": {
      "development": {
        "application/javascript": {
          "presets": ["es2016-node5", "react"],
          "sourceMaps": "inline"
        }
      },
      "production": {
        "only": [
          "app"
        ],
        "application/javascript": {
          "presets": ["es2016-node5", "react"],
          "sourceMaps": "none"
        },
        "plugins": [
          "transform-react-remove-prop-types",
          "transform-react-constant-elements",
          "transform-react-inline-elements"
        ]
      },
      "test": {
        "plugins": [
          "istanbul"
        ]
      }
    }
  },

see following: looks like info variable is being set to undefined. how would this code work? For example, in the second if, if ourEnv is something, maybe staging, the info vaiable becomes undefiend, which causes crash?

config-parser_js_-tol-___documents_projects_anonymousno1_node_tol

caoer avatar Dec 10 '16 13:12 caoer