防止錯誤啓動:當用靜態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
解析頭標記沒有發現錯誤,但會導致不同的錯誤,我將作爲下一個調試線索。
您可以添加所有重現此錯誤的步驟嗎? – Styx
@Styx我已更新我的原始帖子,以顯示確切的命令來複制問題(在當前開發機器上)。 – NorthDecoder