speedskater / babel-plugin-rewire

A babel plugin adding the ability to rewire module dependencies. This enables to mock modules for testing purposes.
843 stars 90 forks source link

Error: `ReferenceError: _typeof is not defined` #154

Closed 5punk closed 7 years ago

5punk commented 7 years ago

I recently started seeing this error with babel-plugin-rewire. If I use previous versions of babel-plugin-rewire I get the error: Error: The (rewire) Babel 5 plugin is being run with Babel 6.

So, kinda stuck. Please help.

My package.json

"babel": "^6.5.2",
    "babel-core": "^6.0.0",
    "babel-loader": "^6.0.0",
    "babel-plugin-rewire": "^1.0.0-beta-1",
    "babel-plugin-transform-runtime": "^6.0.0",
    "babel-preset-es2015": "^6.0.0",
    "babel-preset-stage-2": "^6.0.0",
    "babel-register": "^6.7.2",
    "babel-runtime": "^5.8.0",

I keep getting the error: /Users/axe/test-app:4786 var _typeOfOriginalExport = typeof _DefaultExportValue === 'undefined' ? 'undefined' : _typeof(_DefaultExportValue);

speedskater commented 7 years ago

@5punk. Could you please use 1.0.0-rc-5 as this should solve your issue. Please let me know if this helps.