lundi 12 août 2019

First ember build is very slow and gives a Error

If I start the Puma server with bin/rails server and then call my page via localhost:3000, I get a build error. After that, ember starts to build my app and after that I can call the page normally. But why does he show me an error first and doesn't build the page properly and shows it afterwards? Does anyone know which configuration I have to set how/where for this to work?

My Build Time (on first request):

Build successful (24232ms)

Slowest Nodes (totalTime => 5% )              | Total (avg)         
----------------------------------------------+---------------------
Bundler (1)                                   | 5151ms              
Babel: frontend (2)                           | 3411ms (1705 ms)    
Package /assets/vendor.js (1)                 | 1450ms              
broccoli-persistent-filter:TemplateCom... (7) | 1449ms (207 ms)     
Babel: @ember-data/store (2)                  | 1404ms (702 ms)     
SassCompiler (1)                              | 1308ms              
Babel: ember-test-helpers (2)                 | 1266ms (633 ms)

Output from ember version --verbose && npm --version && yarn --version:

ember-cli: 3.11.0
http_parser: 2.8.0
node: 8.16.0
v8: 6.2.414.77
uv: 1.23.2
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.33.0
napi: 4
openssl: 1.0.2r
icu: 64.2
unicode: 12.1
cldr: 35.1
tz: 2019a
os: darwin x64
6.4.1
1.1.0

My package.json:

{
    "name": "frontend",
    "version": "0.0.0",
    "description": "",
    "license": "MIT",
    "author": "",
    "directories": {
        "doc": "doc",
        "test": "tests"
    },
    "repository": "",
    "scripts": {
        "build": "ember build",
        "start": "ember server",
        "test": "ember test"
    },
    "dependencies": {
        "ember-cli-babel": "^7.8.0",
        "ember-cli-htmlbars": "^3.1.0",
        "ember-cli-shims": "^1.2.0",
        "ember-concurrency": "^1.0.0",
        "ember-data": "3.12.0",
        "ember-file-upload": "^2.4.4",
        "ember-js-pdf": "^0.4.2",
        "ember-responsive": "^3.0.5",
        "ember-source": "3.12.0",
        "ember-wormhole": "^0.5.2",
        "fabulous-table": "^1.0.5",
        "jquery-confirm": "^3.3.2",
        "node-sass": "^4.7.2",
        "print-js": "^1.0.61"
    },
    "devDependencies": {
        "broccoli-asset-rev": "^3.0.0",
        "ember-ajax": "^5.0.0",
        "ember-array-helper": "^5.0.0",
        "ember-cable": "0.8.1",
        "ember-cli": "^3.11.0",
        "ember-cli-app-version": "^3.1.3",
        "ember-cli-dependency-checker": "^3.2.0",
        "ember-cli-head": "0.4.1",
        "ember-cli-htmlbars-inline-precompile": "^2.1.0",
        "ember-cli-ifa": "^0.7.0",
        "ember-cli-mirage": "^1.1.0",
        "ember-cli-moment-shim": "^3.5.0",
        "ember-cli-qunit": "^4.3.0",
        "ember-cli-rails-addon": "0.10.0",
        "ember-cli-sass": "^10.0.1",
        "ember-cli-spinner": "0.0.9",
        "ember-cli-sri": "^2.1.0",
        "ember-cli-test-loader": "^2.2.0",
        "ember-cli-uglify": "^3.0.0",
        "ember-cookies": "^0.4.0",
        "ember-custom-actions": "3.2.0",
        "ember-export-application-global": "^2.0.0",
        "ember-highcharts": "0.5.4",
        "ember-i18n": "^5.1.0",
        "ember-ionicons": "^0.1.1",
        "ember-load-initializers": "^2.0.0",
        "ember-moment": "^7.5.0",
        "ember-resolver": "^5.2.1",
        "highcharts": "^6.2.0",
        "loader.js": "^4.6.0"
    },
    "engines": {
        "node": ">= 8.9.1 < 9"
    },
    "private": true
}

My Error in Server Console:

Completed 500 Internal Server Error in 2822ms (ActiveRecord: 26.7ms)


Not notifying due to an invalid api_key

EmberCli::BuildError - :frontend has failed to build: - Building
:
  app/views/ember_cli/ember/index.html.erb:8:in `_app_views_ember_cli_ember_index_html_erb__3097041922955580926_70136581441240'

My index.html.erb looks like:

<script type="application/javascript">
  window.I18n = {
    locale: '<%= I18n.locale %>',
    defaultLocale: 'de'
  };
</script>

<%= render_ember_app params[:ember_app] do |head| %>
    <% head.append do %>
        <%= csrf_meta_tags %>
    <% end %>
<% end %>




Aucun commentaire:

Enregistrer un commentaire