The exported identifier "_default" is not declared in Babel's scope tracker

Viewed 948

I recently upgraded babel configurations after upgrading to the latest version of TypeScript. When I upgraded babel, I am getting this errors now and I'm not sure why. Has anyone encountered this before and if so, how can I fix it? What is the resolution?

The exported identifier "_default" is not declared in Babel's scope tracker
as a JavaScript value binding, and "@babel/plugin-transform-typescript"
never encountered it as a TypeScript type declaration.
It will be treated as a JavaScript value.

This problem is likely caused by another plugin injecting
"_default" without registering it in the scope tracker. If you are the author
 of that plugin, please use "scope.registerDeclaration(declarationPath)".
The exported identifier "_default" is not declared in Babel's scope tracker
as a JavaScript value binding, and "@babel/plugin-transform-typescript"
never encountered it as a TypeScript type declaration.

Babel dependencies in my project:

    "@babel/core": "^7.13.8",
    "@babel/plugin-proposal-class-properties": "^7.13.0",
    "@babel/plugin-proposal-numeric-separator": "^7.12.13",
    "@babel/preset-env": "^7.13.8",
    "@babel/preset-react": "^7.12.13",
    "@babel/preset-typescript": "^7.13.0"
1 Answers

This configuration worked for me to resolve the same issue. put this in your babelrc

{
  "presets": [
    ["@babel/preset-env", { "targets": { "node": 4 } }],
    "@babel/preset-typescript",
    "@babel/preset-react"
  ],
  "plugins": [
    "@babel/plugin-transform-runtime",
    "transform-class-properties"
  ]
}
Related