2

不确定我会为此获得多少帮助,因为它非常具体,但我开始没有想法了。

我有一个 React + Redux + Webpack 项目,我正在尝试设置 Karma 测试运行器。我有一个karma.conf.js看起来像这样的文件:

var webpack = require('webpack');

module.exports = function (config) {
    config.set({
        browsers: [ 'Chrome' ], 
        singleRun: true, 
        frameworks: [ 'mocha' ], 
        files: [
            'https://unpkg.com/locker.js@7.0.0/build/locker.min.js',
            '**/*.js',
            'tests.webpack.js'
        ],
        preprocessors: {
            'tests.webpack.js': [ 'webpack', 'sourcemap' ] 
        },
        reporters: [ 'dots' ], 
        webpack: { 
            devtool: 'inline-source-map', 
            module: {
                loaders: [
                    { test: /\.js$/, loader: 'babel-loader' }
                ]
            }
        },
        webpackServer: {
            noInfo: true
        }
    });
};

当我运行时,karma start我得到以下输出:

[BABEL] Note: The code generator has deoptimised the styling of "/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/jquery/dist/jquery.js" as it exceeds the max of "100KB".
Hash: 37479a38c85ee2483e4f
Version: webpack 1.13.3
Time: 13077ms
           Asset     Size  Chunks             Chunk Names
tests.webpack.js  4.32 MB       0  [emitted]  tests.webpack.js
chunk    {0} tests.webpack.js (tests.webpack.js) 1.35 MB [rendered]
    [0] ./tests.webpack.js 330 bytes {0} [built]
    [1] ./src -test\.js$ 195 bytes {0} [built]
    [2] ./src/components/tests/app-test.js 879 bytes {0} [optional] [built]
    [3] ./~/react/react.js 161 bytes {0} [built]
    [4] ./~/react/lib/React.js 3.64 kB {0} [built]
    [5] ./~/node-libs-browser/~/process/browser.js 8.04 kB {0} [built]
    [6] ./~/object-assign/index.js 2.68 kB {0} [built]
    [7] ./~/react/lib/ReactChildren.js 8.72 kB {0} [built]
    [8] ./~/react/lib/PooledClass.js 5.46 kB {0} [built]
    [9] ./~/react/lib/reactProdInvariant.js 1.51 kB {0} [built]
   [10] ./~/fbjs/lib/invariant.js 1.74 kB {0} [built]
   [11] ./~/react/lib/ReactElement.js 13.2 kB {0} [built]
   [12] ./~/react/lib/ReactCurrentOwner.js 894 bytes {0} [built]
   [13] ./~/fbjs/lib/warning.js 2.34 kB {0} [built]
   [14] ./~/fbjs/lib/emptyFunction.js 1.5 kB {0} [built]
   [15] ./~/react/lib/canDefineProperty.js 934 bytes {0} [built]
   [16] ./~/react/lib/ReactElementSymbol.js 895 bytes {0} [built]
   [17] ./~/react/lib/traverseAllChildren.js 8.49 kB {0} [built]
   [18] ./~/react/lib/getIteratorFn.js 1.7 kB {0} [built]
   [19] ./~/react/lib/KeyEscapeUtils.js 1.84 kB {0} [built]
   [20] ./~/react/lib/ReactComponent.js 5.69 kB {0} [built]
   [21] ./~/react/lib/ReactNoopUpdateQueue.js 3.87 kB {0} [built]
   [22] ./~/fbjs/lib/emptyObject.js 709 bytes {0} [built]
   [23] ./~/react/lib/ReactPureComponent.js 1.75 kB {0} [built]
   [24] ./~/react/lib/ReactClass.js 29.9 kB {0} [built]
   [25] ./~/react/lib/ReactPropTypeLocationNames.js 869 bytes {0} [built]
   [26] ./~/react/lib/ReactDOMFactories.js 5.96 kB {0} [built]
   [27] ./~/react/lib/ReactElementValidator.js 9.66 kB {0} [built]
   [28] ./~/react/lib/ReactComponentTreeHook.js 14.4 kB {0} [built]
   [29] ./~/react/lib/checkReactTypeSpec.js 5.13 kB {0} [built]
   [30] ./~/react/lib/ReactPropTypesSecret.js 721 bytes {0} [built]
   [31] ./~/react/lib/ReactPropTypes.js 19.5 kB {0} [built]
   [32] ./~/react/lib/ReactVersion.js 456 bytes {0} [built]
   [33] ./~/react/lib/onlyChild.js 1.58 kB {0} [built]
   [34] ./~/expect/lib/index.js 745 bytes {0} [built]
   [35] ./~/expect/lib/Expectation.js 15.7 kB {0} [built]
   [36] ./~/has/src/index.js 234 bytes {0} [built]
   [37] ./~/function-bind/index.js 231 bytes {0} [built]
   [38] ./~/function-bind/implementation.js 2.05 kB {0} [built]
   [39] ./~/tmatch/index.js 6.1 kB {0} [built]
   [40] ./~/buffer/index.js 55.7 kB {0} [built]
   [41] ./~/base64-js/index.js 5.22 kB {0} [built]
   [42] ./~/ieee754/index.js 2.2 kB {0} [built]
   [43] ./~/isarray/index.js 384 bytes {0} [built]
   [44] ./~/expect/lib/assert.js 898 bytes {0} [built]
   [45] ./~/object-inspect/index.js 11.1 kB {0} [built]
   [46] ./~/expect/lib/SpyUtils.js 3.25 kB {0} [built]
   [47] ./~/define-properties/index.js 3.08 kB {0} [built]
   [48] ./~/object-keys/index.js 5.75 kB {0} [built]
   [49] ./~/object-keys/isArguments.js 963 bytes {0} [built]
   [50] ./~/foreach/index.js 944 bytes {0} [built]
   [51] ./~/expect/lib/TestUtils.js 5.16 kB {0} [built]
   [52] ./~/is-regex/index.js 1.64 kB {0} [built]
   [53] ./~/is-equal/why.js 14.2 kB {0} [built]
   [54] ./~/is-arrow-function/index.js 1.26 kB {0} [built]
   [55] ./~/is-callable/index.js 2.81 kB {0} [built]
   [56] ./~/is-boolean-object/index.js 1.76 kB {0} [built]
   [57] ./~/is-date-object/index.js 1.68 kB {0} [built]
   [58] ./~/is-generator-function/index.js 917 bytes {0} [built]
   [59] ./~/is-number-object/index.js 1.75 kB {0} [built]
   [60] ./~/is-string/index.js 1.7 kB {0} [built]
   [61] ./~/is-symbol/index.js 1.9 kB {0} [built]
   [62] ./~/is-equal/getSymbolIterator.js 678 bytes {0} [built]
   [63] ./~/is-equal/getCollectionsForEach.js 638 bytes {0} [built]
   [64] ./~/expect/lib/extend.js 574 bytes {0} [built]
   [65] ./~/react-addons-test-utils/index.js 178 bytes {0} [built]
   [66] ./~/react-dom/lib/ReactTestUtils.js 17.8 kB {0} [built]
   [67] ./~/react-dom/lib/reactProdInvariant.js 1.51 kB {0} [built]
   [68] ./~/react-dom/lib/EventConstants.js 2.39 kB {0} [built]
   [69] ./~/react-dom/lib/EventPluginHub.js 10.2 kB {0} [built]
   [70] ./~/react-dom/lib/EventPluginRegistry.js 11 kB {0} [built]
   [71] ./~/react-dom/lib/EventPluginUtils.js 10.6 kB {0} [built]
   [72] ./~/react-dom/lib/ReactErrorUtils.js 3.02 kB {0} [built]
   [73] ./~/react-dom/lib/accumulateInto.js 1.96 kB {0} [built]
   [74] ./~/react-dom/lib/forEachAccumulated.js 1.13 kB {0} [built]
   [75] ./~/react-dom/lib/EventPropagators.js 7.45 kB {0} [built]
   [76] ./~/react-dom/lib/ReactDOM.js 6.16 kB {0} [built]
   [77] ./~/react-dom/lib/ReactDOMComponentTree.js 8.17 kB {0} [built]
   [78] ./~/react-dom/lib/DOMProperty.js 9.03 kB {0} [built]
   [79] ./~/react-dom/lib/ReactDOMComponentFlags.js 718 bytes {0} [built]
   [80] ./~/react-dom/lib/ReactDefaultInjection.js 3.92 kB {0} [built]
   [81] ./~/react-dom/lib/ARIADOMPropertyConfig.js 2.1 kB {0} [built]
   [82] ./~/react-dom/lib/BeforeInputEventPlugin.js 17.6 kB {0} [built]
   [83] ./~/fbjs/lib/ExecutionEnvironment.js 1.49 kB {0} [built]
   [84] ./~/react-dom/lib/FallbackCompositionState.js 2.75 kB {0} [built]
   [85] ./~/react-dom/lib/PooledClass.js 5.5 kB {0} [built]
   [86] ./~/react-dom/lib/getTextContentAccessor.js 1.4 kB {0} [built]
   [87] ./~/react-dom/lib/SyntheticCompositionEvent.js 1.59 kB {0} [built]
   [88] ./~/react-dom/lib/SyntheticEvent.js 10.4 kB {0} [built]
   [89] ./~/react-dom/lib/SyntheticInputEvent.js 1.54 kB {0} [built]
   [90] ./~/react-dom/lib/ChangeEventPlugin.js 15.4 kB {0} [built]
   [91] ./~/react-dom/lib/ReactUpdates.js 12.7 kB {0} [built]
   [92] ./~/react-dom/lib/CallbackQueue.js 3.59 kB {0} [built]
   [93] ./~/react-dom/lib/ReactFeatureFlags.js 902 bytes {0} [built]
   [94] ./~/react-dom/lib/ReactReconciler.js 6.71 kB {0} [built]
   [95] ./~/react-dom/lib/ReactRef.js 3.57 kB {0} [built]
   [96] ./~/react-dom/lib/ReactOwner.js 3.98 kB {0} [built]
   [97] ./~/react-dom/lib/ReactInstrumentation.js 862 bytes {0} [built]
   [98] ./~/react-dom/lib/ReactDebugTool.js 17.4 kB {0} [built]
   [99] ./~/react-dom/lib/ReactInvalidSetStateWarningHook.js 1.76 kB {0} [built]
  [100] ./~/react-dom/lib/ReactHostOperationHistoryHook.js 1.24 kB {0} [built]
  [101] ./~/fbjs/lib/performanceNow.js 1.1 kB {0} [built]
  [102] ./~/fbjs/lib/performance.js 839 bytes {0} [built]
  [103] ./~/react-dom/lib/Transaction.js 9.94 kB {0} [built]
  [104] ./~/react-dom/lib/getEventTarget.js 1.27 kB {0} [built]
  [105] ./~/react-dom/lib/isEventSupported.js 2.37 kB {0} [built]
  [106] ./~/react-dom/lib/isTextInputElement.js 1.5 kB {0} [built]
  [107] ./~/react-dom/lib/DefaultEventPluginOrder.js 1.37 kB {0} [built]
  [108] ./~/react-dom/lib/EnterLeaveEventPlugin.js 3.61 kB {0} [built]
  [109] ./~/react-dom/lib/SyntheticMouseEvent.js 2.62 kB {0} [built]
  [110] ./~/react-dom/lib/SyntheticUIEvent.js 2.02 kB {0} [built]
  [111] ./~/react-dom/lib/ViewportMetrics.js 893 bytes {0} [built]
  [112] ./~/react-dom/lib/getEventModifierState.js 1.87 kB {0} [built]
  [113] ./~/react-dom/lib/HTMLDOMPropertyConfig.js 6.63 kB {0} [built]
  [114] ./~/react-dom/lib/ReactComponentBrowserEnvironment.js 1.23 kB {0} [built]
  [115] ./~/react-dom/lib/DOMChildrenOperations.js 9.55 kB {0} [built]
  [116] ./~/react-dom/lib/DOMLazyTree.js 5.54 kB {0} [built]
  [117] ./~/react-dom/lib/DOMNamespaces.js 767 bytes {0} [built]
  [118] ./~/react-dom/lib/setInnerHTML.js 4.77 kB {0} [built]
  [119] ./~/react-dom/lib/createMicrosoftUnsafeLocalFunction.js 1.17 kB {0} [built]
  [120] ./~/react-dom/lib/setTextContent.js 1.75 kB {0} [built]
  [121] ./~/react-dom/lib/escapeTextContentForBrowser.js 4.07 kB {0} [built]
  [122] ./~/react-dom/lib/Danger.js 2.52 kB {0} [built]
  [123] ./~/fbjs/lib/createNodesFromMarkup.js 3.41 kB {0} [built]
  [124] ./~/fbjs/lib/createArrayFromMixed.js 5.06 kB {0} [built]
  [125] ./~/fbjs/lib/getMarkupWrap.js 4.44 kB {0} [built]
  [126] ./~/react-dom/lib/ReactDOMIDOperations.js 1.27 kB {0} [built]
  [127] ./~/react-dom/lib/ReactDOMComponent.js 44.5 kB {0} [built]
  [128] ./~/react-dom/lib/AutoFocusUtils.js 881 bytes {0} [built]
  [129] ./~/fbjs/lib/focusNode.js 949 bytes {0} [built]
  [130] ./~/react-dom/lib/CSSPropertyOperations.js 9.99 kB {0} [built]
  [131] ./~/react-dom/lib/CSSProperty.js 4.55 kB {0} [built]
  [132] ./~/fbjs/lib/camelizeStyleName.js 1.42 kB {0} [built]
  [133] ./~/fbjs/lib/camelize.js 1.1 kB {0} [built]
  [134] ./~/react-dom/lib/dangerousStyleValue.js 3.63 kB {0} [built]
  [135] ./~/fbjs/lib/hyphenateStyleName.js 1.39 kB {0} [built]
  [136] ./~/fbjs/lib/hyphenate.js 1.2 kB {0} [built]
  [137] ./~/fbjs/lib/memoizeStringOnly.js 967 bytes {0} [built]
  [138] ./~/react-dom/lib/DOMPropertyOperations.js 9.02 kB {0} [built]
  [139] ./~/react-dom/lib/quoteAttributeValueForBrowser.js 1.01 kB {0} [built]
  [140] ./~/react-dom/lib/ReactBrowserEventEmitter.js 14.2 kB {0} [built]
  [141] ./~/react-dom/lib/ReactEventEmitterMixin.js 1.44 kB {0} [built]
  [142] ./~/react-dom/lib/getVendorPrefixedEventName.js 3.84 kB {0} [built]
  [143] ./~/react-dom/lib/ReactDOMInput.js 13.9 kB {0} [built]
  [144] ./~/react-dom/lib/LinkedValueUtils.js 6.65 kB {0} [built]
  [145] ./~/react-dom/lib/ReactPropTypesSecret.js 725 bytes {0} [built]
  [146] ./~/react-dom/lib/ReactDOMOption.js 4.34 kB {0} [built]
  [147] ./~/react-dom/lib/ReactDOMSelect.js 8.51 kB {0} [built]
  [148] ./~/react-dom/lib/ReactDOMTextarea.js 7.22 kB {0} [built]
  [149] ./~/react-dom/lib/ReactMultiChild.js 16.5 kB {0} [built]
  [150] ./~/react-dom/lib/ReactComponentEnvironment.js 1.78 kB {0} [built]
  [151] ./~/react-dom/lib/ReactInstanceMap.js 1.51 kB {0} [built]
  [152] ./~/react-dom/lib/ReactChildReconciler.js 6.79 kB {0} [built]
  [153] ./~/react-dom/lib/instantiateReactComponent.js 6.12 kB {0} [built]
  [154] ./~/react-dom/lib/ReactCompositeComponent.js 37.5 kB {0} [built]
  [155] ./~/react-dom/lib/ReactNodeTypes.js 1.29 kB {0} [built]
  [156] ./~/react-dom/lib/checkReactTypeSpec.js 5.15 kB {0} [built]
  [157] ./~/react-dom/lib/ReactPropTypeLocationNames.js 873 bytes {0} [built]
  [158] ./~/fbjs/lib/shallowEqual.js 2.64 kB {0} [built]
  [159] ./~/react-dom/lib/shouldUpdateReactComponent.js 2.08 kB {0} [built]
  [160] ./~/react-dom/lib/ReactEmptyComponent.js 1.39 kB {0} [built]
  [161] ./~/react-dom/lib/ReactHostComponent.js 3.97 kB {0} [built]
  [162] ./~/react-dom/lib/getNextDebugID.js 855 bytes {0} [built]
  [163] ./~/react-dom/lib/KeyEscapeUtils.js 1.85 kB {0} [built]
  [164] ./~/react-dom/lib/traverseAllChildren.js 8.52 kB {0} [built]
  [165] ./~/react-dom/lib/ReactElementSymbol.js 899 bytes {0} [built]
  [166] ./~/react-dom/lib/getIteratorFn.js 1.71 kB {0} [built]
  [167] ./~/react-dom/lib/flattenChildren.js 3.74 kB {0} [built]
  [168] ./~/react-dom/lib/ReactServerRenderingTransaction.js 3.22 kB {0} [built]
  [169] ./~/react-dom/lib/ReactServerUpdateQueue.js 5.44 kB {0} [built]
  [170] ./~/react-dom/lib/ReactUpdateQueue.js 10.3 kB {0} [built]
  [171] ./~/react-dom/lib/validateDOMNesting.js 15.7 kB {0} [built]
  [172] ./~/react-dom/lib/ReactDOMEmptyComponent.js 2.27 kB {0} [built]
  [173] ./~/react-dom/lib/ReactDOMTreeTraversal.js 4.68 kB {0} [built]
  [174] ./~/react-dom/lib/ReactDOMTextComponent.js 6.18 kB {0} [built]
  [175] ./~/react-dom/lib/ReactDefaultBatchingStrategy.js 3.18 kB {0} [built]
  [176] ./~/react-dom/lib/ReactEventListener.js 6.37 kB {0} [built]
  [177] ./~/fbjs/lib/EventListener.js 2.93 kB {0} [built]
  [178] ./~/fbjs/lib/getUnboundedScrollPosition.js 1.35 kB {0} [built]
  [179] ./~/react-dom/lib/ReactInjection.js 1.47 kB {0} [built]
  [180] ./~/react-dom/lib/ReactReconcileTransaction.js 6.55 kB {0} [built]
  [181] ./~/react-dom/lib/ReactInputSelection.js 4.8 kB {0} [built]
  [182] ./~/react-dom/lib/ReactDOMSelection.js 8.01 kB {0} [built]
  [183] ./~/react-dom/lib/getNodeForCharacterOffset.js 2.25 kB {0} [built]
  [184] ./~/fbjs/lib/containsNode.js 1.3 kB {0} [built]
  [185] ./~/fbjs/lib/isTextNode.js 853 bytes {0} [built]
  [186] ./~/fbjs/lib/isNode.js 1.25 kB {0} [built]
  [187] ./~/fbjs/lib/getActiveElement.js 1.16 kB {0} [built]
  [188] ./~/react-dom/lib/SVGDOMPropertyConfig.js 7.89 kB {0} [built]
  [189] ./~/react-dom/lib/SelectEventPlugin.js 7.83 kB {0} [built]
  [190] ./~/react-dom/lib/SimpleEventPlugin.js 9.62 kB {0} [built]
  [191] ./~/react-dom/lib/SyntheticAnimationEvent.js 1.69 kB {0} [built]
  [192] ./~/react-dom/lib/SyntheticClipboardEvent.js 1.66 kB {0} [built]
  [193] ./~/react-dom/lib/SyntheticFocusEvent.js 1.52 kB {0} [built]
  [194] ./~/react-dom/lib/SyntheticKeyboardEvent.js 3.2 kB {0} [built]
  [195] ./~/react-dom/lib/getEventCharCode.js 1.78 kB {0} [built]
  [196] ./~/react-dom/lib/getEventKey.js 3.44 kB {0} [built]
  [197] ./~/react-dom/lib/SyntheticDragEvent.js 1.52 kB {0} [built]
  [198] ./~/react-dom/lib/SyntheticTouchEvent.js 1.73 kB {0} [built]
  [199] ./~/react-dom/lib/SyntheticTransitionEvent.js 1.71 kB {0} [built]
  [200] ./~/react-dom/lib/SyntheticWheelEvent.js 2.4 kB {0} [built]
  [201] ./~/react-dom/lib/ReactMount.js 29.3 kB {0} [built]
  [202] ./~/react-dom/lib/ReactDOMContainerInfo.js 1.42 kB {0} [built]
  [203] ./~/react-dom/lib/ReactDOMFeatureFlags.js 722 bytes {0} [built]
  [204] ./~/react-dom/lib/ReactMarkupChecksum.js 2.1 kB {0} [built]
  [205] ./~/react-dom/lib/adler32.js 1.56 kB {0} [built]
  [206] ./~/react-dom/lib/ReactVersion.js 456 bytes {0} [built]
  [207] ./~/react-dom/lib/findDOMNode.js 2.72 kB {0} [built]
  [208] ./~/react-dom/lib/getHostComponentFromComposite.js 1.05 kB {0} [built]
  [209] ./~/react-dom/lib/renderSubtreeIntoContainer.js 528 bytes {0} [built]
  [210] ./~/react-dom/lib/ReactDOMUnknownPropertyHook.js 5.58 kB {0} [built]
  [211] ./~/react-dom/lib/ReactDOMNullInputValuePropHook.js 2.08 kB {0} [built]
  [212] ./~/react-dom/lib/ReactDOMInvalidARIAHook.js 4.32 kB {0} [built]
  [213] ./~/react-dom/lib/ReactShallowRenderer.js 6.34 kB {0} [built]
  [214] ./src/components/container.js 6.93 kB {0} [built] [1 error]
  [216] ./~/color/index.js 11.9 kB {0} [built]
  [217] ./~/clone/clone.js 5.24 kB {0} [built]
  [218] (webpack)/buildin/module.js 361 bytes {0} [built]
  [219] ./~/color-convert/index.js 2.73 kB {0} [built]
  [220] ./~/color-convert/conversions.js 17.5 kB {0} [built]
  [221] ./~/color-name/index.js 4.57 kB {0} [built]
  [222] ./~/color-convert/route.js 3.03 kB {0} [built]
  [223] ./~/color-string/color-string.js 8.65 kB {0} [built]
  [224] ./src/components/input-bar.js 6.43 kB {0} [built]
  [225] ./~/jquery/dist/jquery.js 219 kB {0} [built]
  [226] ./src/components/message-list.js 10.6 kB {0} [built]
  [227] ./src/components/loading-element.js 2.53 kB {0} [built]
  [228] ./src/components/message-wrapper.js 3.1 kB {0} [built]

ERROR in ./~/radium/lib/index.js
Module build failed: ReferenceError: Unknown plugin "add-module-exports" specified in "/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/radium/.babelrc" at 0, attempted to resolve relative to "/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/radium"
    at /Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/file/options/option-manager.js:176:17
    at Array.map (native)
    at Function.normalisePlugins (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/file/options/option-manager.js:154:20)
    at OptionManager.mergeOptions (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/file/options/option-manager.js:229:36)
    at OptionManager.init (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:12)
    at File.initOptions (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/file/index.js:216:65)
    at new File (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/file/index.js:139:24)
    at Pipeline.transform (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-core/lib/transformation/pipeline.js:46:16)
    at transpile (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-loader/index.js:38:20)
    at Object.module.exports (/Users/nicholashaley/Desktop/Work/Ada/chat/node_modules/babel-loader/index.js:131:12)
 @ ./src/components/container.js 13:14-31
28 11 2016 09:41:31.605:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
28 11 2016 09:41:31.607:INFO [launcher]: Launching browser Chrome with unlimited concurrency
28 11 2016 09:41:31.635:INFO [launcher]: Starting browser Chrome
28 11 2016 09:41:32.479:INFO [Chrome 54.0.2840 (Mac OS X 10.12.1)]: Connected on socket /#HjnSrISArGmEs9oPAAAA with id 20278498
Chrome 54.0.2840 (Mac OS X 10.12.1) ERROR
  Uncaught Invariant Violation: Minified React error #37; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=37 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
  at build/bundle.484e3c86.min.js:1
Chrome 54.0.2840 (Mac OS X 10.12.1): Executed 0 of 0 ERROR (1.667 secs / 0 secs)
28 11 2016 09:41:36.149:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.

看起来 Karma 正在被Radium我用于内联 React 样式的模块所吸引。底部附近还有另一个错误输出,也显示Uncaught Invariant Violation: Minified React error #37。在遵循 facebook 上的错误参考之后,完整的错误消息是_registerComponent(...): Target container is not a DOM element.在谷歌搜索之后,我仍然不完全理解这意味着什么或如何修复它。这可能只是镭问题的副作用。

我尝试更改我的根组件以省略Radium并且测试能够运行。我确信这是 Radium 的一个问题,但不知道如何解决这个问题/解决它。任何建议将不胜感激。

4

0 回答 0