Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ember.js Ember CLI:Ember Build不断生成错误的index.html_Ember.js_Ember Cli - Fatal编程技术网

Ember.js Ember CLI:Ember Build不断生成错误的index.html

Ember.js Ember CLI:Ember Build不断生成错误的index.html,ember.js,ember-cli,Ember.js,Ember Cli,理想情况下,我希望我的index.html如下所示: <!-- app/index.html --> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Program With Erik Blog Exampl

理想情况下,我希望我的index.html如下所示:

<!-- app/index.html -->
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Program With Erik Blog Example</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    {{content-for 'head'}}

    <link rel="stylesheet" href="assets/vendor.css">
    <link rel="stylesheet" href="assets/example1.css">

    {{content-for 'head-footer'}}
  </head>
  <body>
    {{content-for 'body'}}

    <script src="assets/vendor.js"></script>
    <script src="assets/example1.js"></script>

    {{content-for 'body-footer'}}
  </body>
</html>

用Erik博客示例编程
{{head'的内容}
{{“页眉页脚”的内容}
{{body'的内容}
{{“正文页脚”的内容}
转换为生产代码。但由于一些奇怪的原因,每次调用ember build时,我都没有得到预期的产品代码。相反,我得到了这样的东西

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Welcome to Firebase Hosting</title>
    .
    .
    .
    <!-- lots of code -->

欢迎使用Firebase主机
.
.
.
这是默认的firebase页面

发生了什么事?我已经多次删除了这张照片。但每次我调用ember build时,它都会生成firebase默认页面,而不是我的ember app index.html


我是ember的新手,我一直在大量使用config/environment.js和firebase.js。有没有想过为什么会发生这种情况?

初始化firebase应用程序时,会出现以下提示:

? What do you want to use as your public directory? (public)
确保将
dist
文件夹设置为公用目录,即

? What do you want to use as your public directory? (public) dist
使用默认的
public
将导致上述行为,无论您构建了多少次余烬应用程序。
要解决此问题,请使用
firebase init
命令重新初始化firebase应用程序,并将正确的文件夹设置为公用目录。

在您的余烬应用程序的公用目录中,是否有文件
index.html
是!我有一个文件在那里,它是相同的HTML文件,不断得到建设!我想这也解决了问题。如果你发布一个答案,我会给你最好的答案。