TypeError: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createContext is not a function报错处理
×
TypeError: __WEBPACK_IMPORTED_MODULE_0_react___default.a.createContext is not a function
./node_modules/react-redux/es/components/Context.js
  1 | import React from 'react';
> 2 | export var ReactReduxContext = React.createContext(null);
  3 | export default ReactReduxContext;
  4 | 
  5 | 
__webpack_require__
  675 | };
  676 | 
  677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  679 | 
  680 | // Flag the module as loaded
  681 | module.l = true;
fn
  85 | 		console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
  86 | 		hotCurrentParents = [];
  87 | 	}
> 88 | 	return __webpack_require__(request);
  89 | };
  90 | var ObjectFactory = function ObjectFactory(name) {
  91 | 	return {
./node_modules/react-redux/es/components/Provider.js
> 1 | import React, { useMemo, useEffect } from 'react';
  2 | import PropTypes from 'prop-types';
  3 | import { ReactReduxContext } from './Context';
  4 | import Subscription from '../utils/Subscription';
__webpack_require__
  675 | };
  676 | 
  677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  679 | 
  680 | // Flag the module as loaded
  681 | module.l = true;
fn
  85 | 		console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
  86 | 		hotCurrentParents = [];
  87 | 	}
> 88 | 	return __webpack_require__(request);
  89 | };
  90 | var ObjectFactory = function ObjectFactory(name) {
  91 | 	return {
./node_modules/react-redux/es/index.js
> 1 | import Provider from './components/Provider';
  2 | import connectAdvanced from './components/connectAdvanced';
  3 | import { ReactReduxContext } from './components/Context';
  4 | import connect from './connect/connect';
__webpack_require__
  675 | };
  676 | 
  677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  679 | 
  680 | // Flag the module as loaded
  681 | module.l = true;
fn
  85 | 		console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
  86 | 		hotCurrentParents = [];
  87 | 	}
> 88 | 	return __webpack_require__(request);
  89 | };
  90 | var ObjectFactory = function ObjectFactory(name) {
  91 | 	return {
./src/index.js
__webpack_require__
  675 | };
  676 | 
  677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  679 | 
  680 | // Flag the module as loaded
  681 | module.l = true;
fn
  85 | 		console.warn("[HMR] unexpected require(" + request + ") from disposed module " + moduleId);
  86 | 		hotCurrentParents = [];
  87 | 	}
> 88 | 	return __webpack_require__(request);
  89 | };
  90 | var ObjectFactory = function ObjectFactory(name) {
  91 | 	return {
__webpack_require__
  675 | };
  676 | 
  677 | // Execute the module function
> 678 | modules[moduleId].call(module.exports, module, module.exports, hotCreateRequire(moduleId));
  679 | 
  680 | // Flag the module as loaded
  681 | module.l = true;
(anonymous function)
  721 | __webpack_require__.h = function() { return hotCurrentHash; };
  722 | 
  723 | // Load entry module and return exports
> 724 | return hotCreateRequire(0)(__webpack_require__.s = 0);
  725 | 
  726 | 
  727 | 
(anonymous function)
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.
Open your browser’s developer console to further inspect this error.
转自:https://blog.csdn.net/qq_41846861/article/details/86571336
                    
                
                
            
        
浙公网安备 33010602011771号