2014-04-16 18 views
0

我需要知道下面显示的问题,当我得到这个问题是试图得到localhost:3000和服务器控制台不包含errors.I没有得到任何关于这个想法。所以你可以请建议我该怎么做?在流星中获取部署URL中的问题?

我希望能拿到认为错误是如下代码:

Template.content.helpers 

({ 
    'renderTemplate': function() 

    { 
     if(Session.get('ContentTemplate') == undefined) 

     { 
     Session.set('ContentTemplate', 'main'); 

     } 

     return new Handlebars.SafeString(Template[Session.get('ContentTemplate')]({dataKey: '0'})); 

    } 

}) 

请检查一次,如何编写上面的代码是在更新0.8版本。

[23:41:40.071] The connection to ws://localhost:3000/sockjs/779/12_lsxfc/websocket was interrupted while the page was loading. @ http://localhost:3000/packages/livedata.js?7f11e3eaafcbe13d80ab0fb510d25d9595e78de2:1338 
[23:41:40.080] GET http://localhost:3000/ [HTTP/1.1 200 OK 9ms] 
[23:41:40.205] Unknown property 'user-select'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:75 
[23:41:40.209] Unknown property 'box-sizing'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:257 
[23:41:40.213] Expected declaration but found '*'. Skipped to next declaration. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:418 
[23:41:40.223] Expected color but found 'auto'. Expected color but found '-webkit-focus-ring-color'. Expected end of value but found '-webkit-focus-ring-color'. Error in parsing value for 'outline'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:482 
[23:41:40.236] Error in parsing value for 'width'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:508 
[23:41:40.263] Unknown pseudo-class or pseudo-element '-webkit-search-decoration'. Ruleset ignored due to bad selector. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:568 
[23:41:40.275] @page rule not allowed within @media or @-moz-document rule. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:624 
[23:41:40.674] Unknown property 'word-break'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:1414 
[23:41:40.684] Unknown property 'transition'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:1557 
[23:41:40.694] Expected color but found 'thin'. Expected color but found 'dotted'. Expected color but found ' '. Expected end of value but found ' '. Error in parsing value for 'outline'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:1578 
[23:41:40.706] Expected end of value but found ' '. Error in parsing value for 'margin-top'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:1588 
[23:41:40.743] Unknown pseudo-class or pseudo-element '-ms-input-placeholder'. Ruleset ignored due to bad selector. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:1658 
[23:41:40.752] Unknown pseudo-class or pseudo-element '-webkit-input-placeholder'. Ruleset ignored due to bad selector. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:1663 
[23:41:40.802] Expected end of value but found ' '. Error in parsing value for 'padding-right'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:2241 
[23:41:40.813] Expected end of value but found ' '. Error in parsing value for 'padding-left'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:2243 
[23:41:40.930] Unknown property '-moz-background-clip'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:3341 
[23:41:40.964] Error in parsing value for 'background-image'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:3378 
[23:41:41.019] Error in parsing value for 'filter'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:3383 
[23:41:41.240] Expected end of value but found ' '. Error in parsing value for 'background-color'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:3652 
[23:41:42.518] Unknown property 'zoom'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:6001 
[23:41:42.529] Unrecognized at-rule or error parsing at-rule '@keyframes'. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:6177 
[23:41:42.719] Unknown property '-moz-background-size'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:6249 
[23:41:42.731] Unknown property 'animation'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:6259 
[23:41:43.855] Unknown property '-moz-opacity'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:7946 
[23:41:43.867] Expected declaration but found '/'. Skipped to next declaration. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:7957 
[23:41:43.928] Error in parsing value for 'font-style'. Declaration dropped. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:8135 
[23:41:43.955] Selector expected. Ruleset ignored due to bad selector. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:8221 
[23:41:43.966] Unexpected end of file while searching for closing } of invalid rule set. @ http://localhost:3000/b114a8a70a1f97d902da1444cfc95b715b3d5f0b.css:8222 
[23:41:44.185] >>>>>>>>>>> renderBodyTemplate @ http://localhost:3000/client/web/views/main/body/body.js?2a5333f86996eda61d279462ae073ad6780f6ea7:1 
[23:41:44.220] Can only call _ensureIndex on server collections @ http://localhost:3000/packages/mongo-livedata.js?cf17a2975aa7445f0db2377c2af07e5efc240958:577 
[23:41:44.244] >>>>>>>>>>> startup @ http://localhost:3000/client/web/index.js?2f61fe43bd100b1f25522fc44d3eb356e0da068a:5 
[23:41:44.275] Template[Session.get("ContentTemplate")] is not a function @ http://localhost:3000/client/web/views/content/content.js?b24eeb8c923cf2032ed9529256717bc171000d56:11 
[23:41:44.290] GET http://localhost:3000/sockjs/info?cb=7_bhz4xmt3 [HTTP/1.1 200 OK 3ms] 
[23:41:44.337] GET http://localhost:3000/sockjs/798/c25yv35x/websocket [HTTP/1.1 101 Switching Protocols 7ms] 

回答

1

看来你有很多的CSS错误。然而,也有可能是你的防止从页面呈现几个Javascript错误:

[23:41:44.185] >>>>>>>>>>> renderBodyTemplate @ http://localhost:3000/client/web/views/main/body/body.js?2a5333f86996eda61d279462ae073ad6780f6ea7:1 
[23:41:44.220] Can only call _ensureIndex on server collections @ http://localhost:3000/packages/mongo-livedata.js?cf17a2975aa7445f0db2377c2af07e5efc240958:577 

你可能宣布一些服务器/客户端集合和没有打电话_ensureIndex仅在服务器代码。

[23:41:44.244] >>>>>>>>>>> startup @ http://localhost:3000/client/web/index.js?2f61fe43bd100b1f25522fc44d3eb356e0da068a:5 
[23:41:44.275] Template[Session.get("ContentTemplate")] is not a function @ http://localhost:3000/client/web/views/content/content.js?b24eeb8c923cf2032ed9529256717bc171000d56:11 

你可能刚刚更新流星0.8(火焰)和方式使用模板来渲染HTML已经改变:https://github.com/meteor/meteor/wiki/Using-Blaze

更新:根据您所添加的新的职位,问题是,模板不再是呈现给定数据参数的HTML的函数。请参考本节的第三点:https://github.com/meteor/meteor/wiki/Using-Blaze#templatefoo-is-not-a-function-and-does-not-return-a-string

+0

请检查一次上面的代码,以及流星0.8版本中有什么可以改变的地方。我没有任何想法,所以你可以给我推荐@ Andrew Mao – Venkat

+0

@ Venkat你将不得不彻底改变你在0.8中的这种做法。查看更新的链接。 –

+0

是的,但实际上我需要改变上面的我的帖子。请你把上面的改成0.8流星版。@ Andrew Mao – Venkat