7.13 "_interopRequireDefault is not a function"
See original GitHub issueIn addition to https://github.com/babel/babel/issues/12851
If you set resolutions for @babel/core to ~7.12.0 you then get this error:
8 | exports.navigateTo = exports.replace = exports.push = exports.navigate = exports.default = void 0;
9 |
> 10 | var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
| ^
11 |
12 | var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
13 |
WebpackError: TypeError: _interopRequireDefault is not a function
- index.js:10
node_modules/gatsby-link/index.js:10:1
- utils.js:136
node_modules/@reach/router/lib/utils.js:136:1
gatsby-link requires babel/runtime/helpers/interopRequireDefault which seems to no longer exist in @babel/runtime@7.13
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:28 (13 by maintainers)
Top Results From Across the Web
How to fix TypeError _interopRequireDefault is not a function ...
I'm trying to use Create React App on Codesandbox.io but I keep receiving TypeError _interopRequireDefault is not a function import ReactDOM ...
Read more >Issue creating new project - RedwoodJS Community
TypeError : _interopRequireDefault is not a function . ... I don't have a interopRequireDefault.js; instead it's a directory with two files:
Read more >babel/plugin-transform-runtime
A plugin that enables the re-use of Babel's injected helper code to save on codesize.
Read more >@babel/runtime - npm
babel's modular runtime helpers. Latest version: 7.20.7, last published: 3 days ago. Start using @babel/runtime in your project by running ...
Read more >How to fix TypeError _interopRequireDefault is not a function ...
Coding example for the question How to fix TypeError _interopRequireDefault is not a function in Create React App-Reactjs.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, I’ll start working on this in 10 mins
Oh I think that the reason was that one of your dependency was using
@babel/runtime@7.13.0as a dependency, and by explicitly installing it you forced npm to update it. You can probably remove@babel/runtimefrom your deps now.