错误阻止启动:使用静态 html 处理文件时

Nor*_*der 2 meteor

错误阻止启动:使用静态 html 处理文件时

作为我对meteor 的介绍,我正在测试分叉包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
Run Code Online (Sandbox Code Playgroud)

第一条错误信息

=> 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.
Run Code Online (Sandbox Code Playgroud)

开发版本信息:

$ 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
Run Code Online (Sandbox Code Playgroud)

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

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

以表面价值获取错误消息,我在文件顶部添加了一个<head><body>标签,client/master_layout.html这并没有改变错误消息。

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

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

<template name="_houston_master_layout">
...
Run Code Online (Sandbox Code Playgroud)

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

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


2017 年 9 月 20 日更新

我希望找到一个已经走上这条路的人对这个问题的快速答案。到目前为止,没有人提出答案,所以我继续我的搜索,这是我发现的。

在 .meteor/package 中

#static-html            # remove this package
blaze-html-templates    # add this package
Run Code Online (Sandbox Code Playgroud)

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