Aurelia CLI视口不渲染

时间:2019-03-04 19:17:34

标签: aurelia aurelia-cli aurelia-framework

我按照此处的文档为打字稿创建了一个新的aurelia项目 https://aurelia.io/docs/tutorials/creating-a-contact-manager。 CLI的安装版本是aurelia-cli v1.0.0-beta.13。我遵循了所有步骤,包括根据需要将样本更改为TS。我确实下载了所需的其他资产,并根据文档将文件重命名。当我键入“ au run”或“ au run --watch”时,该站点将编译而没有错误。

视口从不渲染。它是完全空白的。但是,标题会渲染。 如果我查看页面的源代码,这就是我所看到的完全符合格式的内容。

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Aurelia Navigation Skeleton</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <base href="/">
    <!-- imported CSS are concatenated and added automatically -->
  </head>
  <body aurelia-app="main">
  <script type="text/javascript" src="/runtime~app.89f02086e8de1923ee27.bundle.js"></script><script type="text/javascript" src="/vendors~7e79ec10.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~556c66f2.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~72fdf3f2.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~50e8d500.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~5ea1390f.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~ecff2e3d.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~02227409.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~7274e1de.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~1dd9cae8.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~db300d2f.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~b58f7129.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~ec8c427e.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~95a414bc.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~de47f514.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/vendors~5196d596.89f02086e8de1923ee27.chunk.js"></script><script type="text/javascript" src="/app~d0ae3f07.89f02086e8de1923ee27.chunk.js"></script></body>
</html>

节点版本为v10.15.2

NPM为6.8.0

Windows版本7

打字稿版本为3.3.3333

如何获取chrome,firefox或IE11来渲染某些内容?

1 个答案:

答案 0 :(得分:1)

当我安装引导程序时,还需要加载许多依赖项。

npm WARN acorn-dynamic-import@4.0.0 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN aurelia-tools@2.0.0 requires a peer of babel-eslint@^7.2.3 but none is installed. You must install peer dependencies yourself.
npm WARN aurelia-tools@2.0.0 requires a peer of eslint@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.3.1 requires a peer of popper.js@^1.14.7 but none is installed. You must install peer dependencies yourself.

我会以为在安装CLI时,aurelia-tools会安装eslint和babel-eslint软件包,但这是另一回事。