Reactjs 手风琴的臭虫

Reactjs 手风琴的臭虫,reactjs,npm,Reactjs,Npm,Im使用以下npm库: "react-accessible-accordion": "2.3.1", 它正在向我返回一个错误: ReferenceError: babelHelpers is not defined (anonymous function) C:/Users/tabm005/www/node_modules/react-accessible-accordion/dist/umd/index.js:1037 1034 | 1035 | var createReactContex

Im使用以下npm库:

"react-accessible-accordion": "2.3.1", 
它正在向我返回一个错误:

ReferenceError: babelHelpers is not defined
(anonymous function)
C:/Users/tabm005/www/node_modules/react-accessible-accordion/dist/umd/index.js:1037
1034 |
1035 | var createReactContext = unwrapExports(lib);
1036 |
> 1037 | var _typeof = typeof Symbol === "function" && babelHelpers.typeof(Symbol.iterator) === "symbol" ? function (obj) {
    1038 |   return typeof obj === 'undefined' ? 'undefined' : babelHelpers.typeof(obj);
    1039 | } : function (obj) {
    1040 |   return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === 'undefined' ? 'undefined' : babelHelpers.typeof(obj);
    View compiled
        ./node_modules/react-accessible-accordion/dist/umd/index.js.React__default
    http://localhost:3000/static/js/bundle.js:121672:10
        121669 | /***/ (function(module, exports, __webpack_require__) {
                121670 |
                121671 | (function (global, factory) {
                > 121672 |   true ? factory(exports, __webpack_require__(/*! react */ "./node_modules/react/index.js")) :
                |           ^  121673 |     typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
                        121674 |    (factory((global.reactAccessibleAccordion = {}),global.React));
                    121675 | }(this, (function (exports,React) { 'use strict';
                    View source
                        ./node_modules/react-accessible-accordion/dist/umd/index.js
                    C:/Users/tabm005/www/node_modules/react-accessible-accordion/dist/umd/index.js:5
                    2 |     typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
                        3 |     typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
                            4 |     (factory((global.reactAccessibleAccordion = {}),global.React));
                > 5 | }(this, (function (exports,React) { 'use strict';
                    6 |
                    7 | var React__default = 'default' in React ? React['default'] : React;
                    8 |
                    View compiled
                    __webpack_require__
                    C:/Users/tabm005/www/webpack/bootstrap ad42cbaf3c46aaff76f3:678
                    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;
                View compiled
                fn
                C:/Users/tabm005/www/webpack/bootstrap ad42cbaf3c46aaff76f3:88
                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 {
            View compiled
                ./src/components/Summary/summaryAccordion.js
        http://localhost:3000/static/js/bundle.js:198742:85
            __webpack_require__
        C:/Users/tabm005/www/webpack/bootstrap ad42cbaf3c46aaff76f3:678
        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;
        View compiled
        fn
        C:/Users/tabm005/www/webpack/bootstrap ad42cbaf3c46aaff76f3:88
        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 {
            View compiled
                ./src/components/stepsFormsContainer/stepsFormsContainer.js
        http://localhost:3000/static/js/bundle.js:206311:84
            __webpack_require__
        C:/Users/tabm005/www/webpack/bootstrap ad42cbaf3c46aaff76f3:678
        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;
        View compiled
        fn
        C:/Users/tabm005/www/webpack/bootstrap ad42cbaf3c46aaff76f3:88
        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 {
        View compiled
            ./src/components/stepsFormsContainer/index.js
    C:/Users/tabm005/www/src/components/stepsFormsContainer/index.js:1
    > 1 | import StepsFormsContainer from './stepsFormsContainer';
    2 |
    3 | export default StepsFormsContainer;
    4 |
    View compiled
▶ 5 stack frames were collapsed.
        ./src/components/stepperManager/index.js
    C:/Users/tabm005/www/src/components/stepperManager/index.js:1
    > 1 | import StepperManager from './stepperManager';
    2 |
    3 | export default StepperManager;
    4 |
    View compiled
▶ 12 stack frames were collapsed.
        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.
我尝试了几种操作:删除node_模块和package-lock.json并重新安装应用程序。我也尝试了新版本的手风琴,但没有一个解决方案对我有效


有什么想法吗?

我添加了巴别塔图书馆,解决了我的问题:

"babel": "^6.23.0",
"babel-core": "^6.26.3"