仅在缩小时才会在流星内部发生反应时产生参考误差

时间:2017-10-22 21:58:30

标签: javascript reactjs meteor minify

我在流星应用中使用了反应。它在开发模式下运行时工作正常,但是当我在生产模式下运行并且代码缩小时,我会在应用程序加载时在浏览器控制台中得到以下ReferenceError和缩小的反应错误。当我尝试部署它时会发生同样的事情。

使用内置的standard-minifier-js缩小它。当我meteor remove这个包时,它运行正常,所以它绝对是缩小。

我很难过。我知道有问题的行是react-dom的一部分,但我无法确定哪个部分或为什么它只会在缩小后抛出错误。

react error decoder说:

Should have found an error boundary. This error is likely caused by a bug in React. Please file an issue.

哪个更有帮助。什么可能导致错误的想法,或如何解决它?我使用了最新版本的AFAICT:

  • 反应版本:16.0.0
  • 流星版:1.5.2.2
  • standard-minifier-js version:2.1.2

感谢。

b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5149 ReferenceError: av is not defined
    at b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:4003
    at sv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:4107)
    at dv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:4104)
    at beginWork (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:4243)
    at ov (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:4941)
    at fv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:4976)
    at lv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5028)
    at mv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5182)
    at bv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5164)
    at Object.updateContainer (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:8400)
pv @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5149
lv @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5042
mv @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5182
bv @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5164
updateContainer @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:8400
(anonymous) @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5603
unbatchedUpdates @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5258
Dr @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5602
render @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:8559
(anonymous) @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:93855
s @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:315
u @ b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:321
b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:3148 Uncaught Error: Minified React error #183; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=183 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at ot (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:3148)
    at lv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5043)
    at mv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5182)
    at bv (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5164)
    at Object.updateContainer (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:8400)
    at b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5603
    at Object.unbatchedUpdates (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5258)
    at Dr (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:5602)
    at render (b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:8559)
    at b2413faf75d38415b6ec79874ae1bd18fb0a8af3.js?meteor_js_resource=true:formatted:93855

1 个答案:

答案 0 :(得分:0)

我尝试了另一个缩小包,uglifyjs2,而不是标准minifier-js,这似乎有效。但似乎这里有一个反应或流星的错误。

meteor remove standard-minifier-js
meteor add ssrwpo:uglifyjs2