问题
Errors prevented startup: While processing files with static-html
As my introduction to meteor I am testing forked package Houston. I ran the following commands.
$ 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
The first error message
=> 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.
Development Version Info:
$ 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
So I searched the web for similar questions and found:
- github dot com iron-meteor/iron-cli issue [#256], no answers to this issue yet ...
Taking the error message at face value, I added a <head>
and <body>
tag
to the top of the file client/master_layout.html
which did not change
the error message.
<head>
<title>Houston</title>
</head>
<body>
{{> _houston_master_layout}}
</body>
<template name="_houston_master_layout">
...
I did not see a similar issue in the original authors github issues, which makes me think maybe I have version problems, or I have installed something incorrectly.
As a sanity check, in a separate directory I installed a simple example from github leveluptuts/Blaze-Base to confirm the current meteor install was working okay. OK
UPDATE 20-Sept 2017
I was hoping to find a quick answer to this question by someone who has been down this path already. So far no one has stepped up with an answer, so I am continuing my search and here is what I have found.
In .meteor/package
#static-html # remove this package
blaze-html-templates # add this package
Resolves the head tag not found error, but leads to other different errors, which I will take as a next debugging clue.
回答1:
Same issue when reinstalling fresh meteor ... due to disk crash
meteor remove static-html
meteor add blaze-html-templates
Made my app able to start
回答2:
Yes, somewhat similar to my case. Meteor 1.5.2.2
I created a --bare project then add standard folders like client,server and public with the basic files in the client folder.
It works after commenting the static-html in .meteor/packages, then add blaze-html-templates
#static-html # remove this package
blaze-html-templates # add this package
来源:https://stackoverflow.com/questions/46272137/errors-prevented-startup-while-processing-files-with-static-html