在Meteor中获取部署URL的问题?

时间:2014-04-16 18:20:00

标签: meteor

当我遇到此问题时,我需要知道下面显示的问题是尝试获取localhost:3000并且服务器控制台没有错误。我对此没有任何了解。所以你能不能请建议我该怎么做?

我希望认为get error是下面显示的代码:

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 个答案:

答案 0 :(得分: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

您可能刚刚更新到Meteor 0.8(Blaze),并且使用模板呈现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

相关问题