【发布时间】:2017-05-30 08:07:42
【问题描述】:
复制回购
https://github.com/github0013/ror_rbc/commit/246f6e1839cdd6aababeeacb9301a80b040e453d
# git clone, then
bundle && npm install
foreman start -f Procfile.dev # should start the server at http://localhost:3000/hello_world
问题
我正在使用
https://github.com/shakacode/react_on_rails
构建一个网络应用程序,但如果我尝试在 jsx 文件中import BigCalendar from 'react-big-calendar',它会在标题中给出错误。
我检查的东西
https://github.com/intljusticemission/react-big-calendar
这个库使用
https://github.com/react-bootstrap/dom-helpers
和
https://github.com/react-bootstrap/dom-helpers/blob/master/src/query/matches.js#L7
就我检查而言,这一行 document.body 为空。
为什么文档是空的?
我对 reactjs、webpack 等还是很陌生,所以我确定我缺少一些基本知识,但是如果有人能指出为什么缺少文档对象,请告诉我。
【问题讨论】:
标签: ruby-on-rails reactjs webpack react-on-rails