恶作剧参考错误:无法找到变量:RWR

时间:2017-03-27 20:40:15

标签: react-redux

我最近在我的项目中安装了rwr-redux,Rails功能规格现在失败,出现以下错误:

Capybara::Poltergeist::JavascriptError:
  One or more errors were raised in the Javascript code on the page. If you don't care about these errors, you can ignore them by setting js_errors: false in your Poltergeist configuration (see documentation for details).

  ReferenceError: Can't find variable: RWR
  ReferenceError: Can't find variable: RWR
      at http://127.0.0.1:65150/assets/application-a3b817ad22570913fde9f581c275f3c7cca4f7e364708af51a5226a506b3ef53.js:14564 in _mountNodes
      at :0 in dispatchEvent
      at http://127.0.0.1:65150/assets/application-a3b817ad22570913fde9f581c275f3c7cca4f7e364708af51a5226a506b3ef53.js:12191 in dispatch
      at http://127.0.0.1:65150/assets/application-a3b817ad22570913fde9f581c275f3c7cca4f7e364708af51a5226a506b3ef53.js:12191 in notifyApplicationAfterPageLoad
      at http://127.0.0.1:65150/assets/application-a3b817ad22570913fde9f581c275f3c7cca4f7e364708af51a5226a506b3ef53.js:12191 in pageLoaded
      at http://127.0.0.1:65150/assets/application-a3b817ad22570913fde9f581c275f3c7cca4f7e364708af51a5226a506b3ef53.js:12191

页面肯定加载没有Javascript错误。我不想设置js_errors: false因为反应组件不会渲染。

从我的index.jsx文件中运行RWR:

import 'babel-polyfill';

import RWR, { integrationsManager } from 'react-webpack-rails'; 
import RWRRedux from 'rwr-redux';

RWR.run(); 
integrationsManager.register('redux-store',   RWRRedux.storeIntegrationWrapper); 
integrationsManager.register('redux-container', RWRRedux.containerIntegrationWrapper);

我在运行rspec之前尝试过破坏资产和预编译,以确保生成react_bundle但是我得到了同样的错误。知道这里发生了什么吗?

0 个答案:

没有答案