【问题标题】:Errors prevented startup: While processing files with static-html错误阻止启动:使用 static-html 处理文件时
【发布时间】:2018-08-06 19:29:25
【问题描述】:

错误阻止启动:使用 static-html 处理文件时

作为我对流星的介绍,我正在测试分叉包Houston。 我运行了以下命令。

$ mkdir tempspace
$ cd tempspace
$ git clone https://github.com/gterrono/houston
$ meteor create --bare houston
$ cd houston
$ meteor node -v
v4.8.4
# meteor reset  # starts from scratch, deletes databases
$ meteor update
This project is already at Meteor 1.5.2, the latest release.

Changes to your project's package version selections from updating package
versions:

dynamic-import  upgraded from 0.1.1 to 0.1.3

$ meteor run --port 192.168.1.98:3000
Selecting package versions
=> Started proxy
| Bulding for web.browser
| Linking
| Building for os.linux_x32

第一条错误信息

=> Errors prevented startup:

While processing files with static-html (for target web.browser):
client/partials/admin_nav.html:1: Expected <head> or <body> tag
client/partials/custom_actions.html:1: Expected <head> or <body> tag
client/partials/flash_message.html:1: Expected <head> or <body> tag
client/third-party/bootstrap.html:1: Expected <head> or <body> tag
client/third-party/collapse.js.html:1: Expected <head> or <body> tag
test/test_app/my_tmpl.html:1: Expected <head> or <body> tag
test/test_app/test.html:11: Expected <head> or <body> tag
client/admin_change_password.html:1: Expected <head> or <body> tag
client/admin_login.html:1: Expected <head> or <body> tag
client/collection_view.html:1: Expected <head> or <body> tag
client/custom_template_view.html:1: Expected <head> or <body> tag
client/db_view.html:1: Expected <head> or <body> tag
client/document_view.html:1: Expected <head> or <body> tag
client/master_layout.html:10: Expected <head> or <body> tag
client/style.css.html:1: Expected <head> or <body> tag

=> Your application has errors. Waiting for file change.
=> Started MongoDB.

开发版本信息:

$ uname -a
Linux localhost.localdomain 3.6.10-4.fc18.i686.PAE #1 SMP Tue Dec 11 18:15:08 UTC 2012 i686 i686 i386 GNU/Linux
$ meteor node -v  
v4.8.4
$ meteor --version 
Meteor 1.5.2
# by inspection
Houston 2.0.7

于是我在网上搜索了类似的问题,发现:

  • github dot com iron-meteor/iron-cli issue [#256],这个问题还没有答案...

从表面上看错误信息,我添加了&lt;head&gt;&lt;body&gt; 标签 到文件顶部client/master_layout.html 没有改变 错误信息。

<head>
  <title>Houston</title>
</head>

<body>
    {{> _houston_master_layout}}
</body>

<template name="_houston_master_layout">
...

我确实没有在原作者的github问题中看到类似的问题,这让我觉得可能是我有版本问题,或者我安装了不正确的东西。

作为健全性检查,我在一个单独的目录中安装了一个来自 github leveluptuts/Blaze-Base 的简单示例,以确认当前的流星安装工作正常。 OK


更新 2017 年 9 月 20 日

我希望找到已经走这条路的人快速回答这个问题。到目前为止,还没有人给出答案,所以我继续搜索,这就是我找到的。

在.meteor/包中

#static-html            # remove this package
blaze-html-templates    # add this package

解决 head tag not found 错误,但会导致其他不同的错误,我将作为下一个调试线索。

【问题讨论】:

  • 能否添加所有步骤以重现此错误?
  • @Styx 我已经更新了我的原始帖子以显示复制问题的确切命令(在当前开发机器上)。

标签: meteor


【解决方案1】:

重新安装新流星时出现同样的问题...由于磁盘崩溃

meteor remove static-html
meteor add blaze-html-templates

让我的应用能够启动

【讨论】:

  • 已确认。谢谢。
【解决方案2】:

是的,和我的情况有些相似。流星 1.5.2.2
我创建了一个 --bare 项目,然后在客户端文件夹中添加了标准文件夹,例如客户端、服务器和公共文件夹。

在 .meteor/packages 中注释掉 static-html,然后添加 blaze-html-templates 就可以了

#static-html # 移除这个包
blaze-html-templates # 添加这个包

【讨论】:

    猜你喜欢
    • 2021-12-19
    • 1970-01-01
    • 2019-02-27
    • 2013-05-25
    • 2020-02-15
    • 2017-08-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多