尝试运行下一个示例http://kirjs.github.io/react-highcharts
卡住了线:
global.HighchartsAdapter = require('exports?HighchartsAdapter!highcharts-standalone-adapter');
没有它,得到错误
Uncaught TypeError: Cannot set property 'HighchartsAdapter' of undefined
有了它,显然得到
Cannot find module 'exports?HighchartsAdapter!highcharts-standalone-adapter'
所以,真正的问题是如何包含 HighchartsAdapter。
PS这个问题的标题不同,因为这是我最初的谷歌请求。而且我并不孤单https://github.com/kirjs/react-highcharts/search?q=Cannot+set+property+%27HighchartsAdapter%27+of+undefined&type=Issues&utf8=%E2%9C%93