升级到 Meteor 1.0.3.1 后,我现在收到此错误
ReferenceError: moment is not defined
我可以在这里看到它把momentjs升级到了新版本
momentjs:moment added, version 2.8.4
mrt:moment removed from your project
tsega:bootstrap3-datetimepicker upgraded from 3.1.3_1 to 3.1.3_3
这是我第一次收到该错误的代码
var today = new moment().format('MM/DD/YYYY');
看起来它应该仍然有效。我尝试重新安装它,但现在应用程序崩溃了。
其他人也遇到过这个问题吗?
最佳答案
我认为Atmosphere上的moment包实际上已经到了2.9.0。尝试运行meteor更新,或手动删除moment包(mete或remove momentjs:moment)并重新添加它。
此外,您不需要使用 new moment(),只需使用 moment(),如下所示:
var today = moment().format('MM/DD/YYYY');
关于Meteor 升级到 1.0.3.1 现在我收到 ReferenceError : moment is not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28529978/