简体   繁体   English

在将MessageFormat添加到Meteor应用后,调用方法'headersToken'时出错

[英]Error invoking Method 'headersToken' after installing adding MessageFormat to Meteor app

After installing MessageFormat with meteor add gadicohen:messageformat I get this error in the browser console: meteor add gadicohen:messageformat安装MessageFormat后, meteor add gadicohen:messageformat我在浏览器控制台中收到此错误:

Error invoking Method 'headersToken': Internal server error [500]

the full error log in the Terminal: 终端中的完整错误日志:

=> App running at: http://localhost:3000/
I20160104-14:23:58.795(1)? Exception while invoking method 'headersToken' Error: Did not check() all arguments during call to 'headersToken'
I20160104-14:23:58.797(1)?     at [object Object]._.extend.throwUnlessAllArgumentsHaveBeenChecked (packages/check/match.js:411:1)
I20160104-14:23:58.797(1)?     at Object.Match._failIfArgumentsAreNotAllChecked (packages/check/match.js:106:1)
I20160104-14:23:58.797(1)?     at maybeAuditArgumentChecks (livedata_server.js:1695:18)
I20160104-14:23:58.797(1)?     at livedata_server.js:708:19
I20160104-14:23:58.797(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160104-14:23:58.797(1)?     at livedata_server.js:706:40
I20160104-14:23:58.798(1)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20160104-14:23:58.798(1)?     at livedata_server.js:704:46
I20160104-14:23:58.798(1)?     at tryCallTwo (/Users/psychomachine/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:45:5)
I20160104-14:23:58.798(1)?     at doResolve (/Users/psychomachine/.meteor/packages/promise/.0.5.1.8idxpg++os+web.browser+web.cordova/npm/node_modules/meteor-promise/node_modules/promise/lib/core.js:171:13)

I am new to Meteor, and so far things have been pretty smooth, but with this error I am not sure how to proceed. 我是Meteor的新手,到目前为止一切都很顺利,但是由于出现此错误,我不确定如何继续。 I'd prefer to use MessageFormat and not some other i18 package, because of the GUI for translations that comes with MessageFormat. 我更喜欢使用MessageFormat而不是其他i18软件包,因为MessageFormat附带了用于翻译的GUI。

Any tips will be greatly appreciated. 任何提示将不胜感激。

All best, Tench 最好的Tench

i am far from an expert... but right off the bat - first line of the error - check()... that is informative. 我距离专家还很远...但是马上就可以了-错误的第一行-check()...那是很有信息的。

Something is being pushed to the headersToken method and it is attempting to write something to a collection - but it is not first "check"-ing those parameters before writing. 某些东西被推送到headersToken方法,并且它正在尝试向集合中写入内容-但是在写入之前,它并不是首先“检查”这些参数。

If you turned off check, this would pass. 如果您关闭了检查功能,这将通过。 I ran into something similar while trying to use ServerSessions and ended up needing to create my own package that included check on the write. 我在尝试使用ServerSessions时遇到了类似的情况,最终需要创建自己的程序包,其中包括写入检查。

https://github.com/tewksbum/meteor-server-session https://github.com/tewksbum/meteor-server-session

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM