2017-09-18 40 views
1

防止错误启动:当用静态HTML防止错误启动:在处理文件与静态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上科网铁-meteor/iron-cli问题[#256],没有答案t Ø这个问题尚未...

以面值的错误信息,我添加了一个<head><body>标签 到文件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


UPDATE 20 2017年9月

我希望能找到一个快速的答案,有人这个问题谁一直沿着这条路了。到目前为止,没有人提出答案,所以我继续搜索,这里是我发现的。

在.meteor /包

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

解析头标记没有发现错误,但会导致不同的错误,我将作为下一个调试线索。

+0

您可以添加所有重现此错误的步骤吗? – Styx

+0

@Styx我已更新我的原始帖子,以显示确切的命令来复制问题(在当前开发机器上)。 – NorthDecoder

回答

0

是的,有点类似于我的情况。流星1.5.2.2
我创建了一个--bare项目,然后添加标准文件夹,如客户端,服务器和公共与客户端文件夹中的基本文件。

它工作在.meteor /包注释的静态HTML,再加入闪耀HTML模板

#静态HTML#删除该软件包,
闪耀HTML模板#添加此包