简体   繁体   English

流星错误:完整项目不会显示在浏览器中

[英]Meteor error: Full project wont display in browser

I'm having a problem getting Meteor to work. 我在让Meteor工作时遇到问题。 I'm not sure if I'm just missing some Meteor convention, but I don't think that is the case. 我不确定是否只是缺少一些流星公约,但我认为情况并非如此。 I've created a new project with this file structure: 我使用以下文件结构创建了一个新项目:

*client
  -signup.html
  -signup.js
  -main.html
  -main.js
*public
*server
  -accounts.js

There are some more .css files, but I didn't see the need to list them. 还有更多的.css文件,但我认为没有必要列出它们。 My problem, is that when I run the server and visit the site on localhost, the main.html will load, but nothing in the body tags is rendered. 我的问题是,当我运行服务器并访问localhost上的站点时,将加载main.html,但是body标记中未呈现任何内容。 I looked at the order that Meteor loads files, to see if maybe something wasn't loading right. 我查看了Meteor加载文件的顺序,以查看是否某些文件加载​​不正确。 Everything seemed ok. 一切似乎还好。

I also looked at a couple github projects in meteor, cloned them, added the packages, and then ran them on my local machine. 我还查看了流星中的几个github项目,克隆了它们,添加了软件包,然后在本地计算机上运行了它们。 I get the same problem. 我遇到同样的问题。

I also deployed to meteor's servers in case it was something with my local system, but the same thing happens with the deployed app. 我还部署到了流星的服务器,以防本地系统出现问题,但是部署的应用程序也会发生同样的事情。

Is there some convention or configuration that I am missing? 我缺少一些约定或配置吗?

EDIT: Add contents of main.html 编辑:添加main.html的内容

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Routed Auth</title>

</head>


<body>
    {{> header}}

    <div id="wrap">
        <div class="container-fluid">
            <div class="row-fluid">
                <div id="main" class="span12">
                    {{renderPage}}
                </div>
            </div>
        </div>
        <div id="spacer"></div>
    </div>

    {{> footer}}
</body>

(per comments above:) (根据以上评论:)

If the leaderboard app works, and your app's code isn't very complicated, then one or more of the packages you're adding are causing your troubles. 如果排行榜应用程序正常运行,并且您的应用程序代码不是很复杂,则您添加的一个或多个软件包会引起麻烦。 In particular an obsolete router package could cause lots of failures; 特别是过时的路由器软件包可能会导致很多故障。 try using Iron Router if you aren't already. 如果还没有,请尝试使用Iron Router I would create a fresh app and copy your files into it and run it, then add packages one by one to see which one causes the app to crash. 我将创建一个新的应用程序,然后将文件复制到其中并运行它,然后逐个添加软件包,以查看哪个软件包导致该应用程序崩溃。

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

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