aurelia / templating-resources

A standard set of behaviors, converters and other resources for use with the Aurelia templating library.
MIT License
59 stars 55 forks source link

Issue when upgrading from 1.4.0 to >= 1.5.0 #347

Closed mpoelman closed 5 years ago

mpoelman commented 6 years ago

I'm submitting a bug report

Please tell us about your environment:

Current behavior: When running 'au run --watch', and navigating to localhost:9000, I get the following error in the console.

Unhandled rejection RangeError: Maximum call stack size exceeded at ViewCompiler._compileElement (http://localhost:9000/scripts/vendor-bundle.js:25727:70) at ViewCompiler._compileNode (http://localhost:9000/scripts/vendor-bundle.js:25584:23) at ViewCompiler._compileNode (http://localhost:9000/scripts/vendor-bundle.js:25606:33) at ViewCompiler.compile (http://localhost:9000/scripts/vendor-bundle.js:25553:12) at HtmlBehaviorResource.compile (http://localhost:9000/scripts/vendor-bundle.js:27027:46) at ViewCompiler._compileElement (http://localhost:9000/scripts/vendor-bundle.js:25860:40) at ViewCompiler._compileNode (http://localhost:9000/scripts/vendor-bundle.js:25584:23) at ViewCompiler._compileNode (http://localhost:9000/scripts/vendor-bundle.js:25606:33) at ViewCompiler.compile (http://localhost:9000/scripts/vendor-bundle.js:25553:12) at HtmlBehaviorResource.compile (http://localhost:9000/scripts/vendor-bundle.js:27027:46) at ViewCompiler._compileElement (http://localhost:9000/scripts/vendor-bundle.js:25860:40) at ViewCompiler._compileNode (http://localhost:9000/scripts/vendor-bundle.js:25584:23) at ViewCompiler._compileNode (http://localhost:9000/scripts/vendor-bundle.js:25606:33) at ViewCompiler.compile (http://localhost:9000/scripts/vendor-bundle.js:25553:12) at HtmlBehaviorResource.compile (http://localhost:9000/scripts/vendor-bundle.js:27027:46) at ViewCompiler._compileElement (http://localhost:9000/scripts/vendor-bundle.js:25860:40)

This only happens with aurelia-templating-resources version 1.5.0 and up (tested 1.5.0, 1.5.1, 1.5.4 and 1.6.0). When I use version 1.4.0 of aurelia-templating-resources, no errors occur and I can use my app without any problems.

Expected/desired behavior: Well, I can't reproduce this issue in a new project, so i assume this is an issue that occurs specifically in my project (maybe because other dependency requirements are not met).

This is the output of npm ls --depth 1: +-- @progress/kendo-ui@2018.1.411 | -- jquery@3.3.1 deduped +-- @types/bootstrap@4.1.0 | +-- @types/jquery@3.3.1 |-- popper.js@1.14.3 deduped +-- @types/filesize@3.6.0 +-- @types/jasmine@2.8.6 +-- @types/kendo-ui@2018.1.2 | -- @types/jquery@3.3.1 deduped +-- @types/node@9.6.6 +-- aurelia-animator-css@1.0.4 | +-- aurelia-metadata@1.0.3 | +-- aurelia-pal@1.3.0 |-- aurelia-templating@1.4.2 +-- aurelia-bootstrapper@2.2.0 | +-- aurelia-event-aggregator@1.0.1 | +-- aurelia-framework@1.1.4 | +-- aurelia-history@1.1.0 | +-- aurelia-history-browser@1.1.0 | +-- aurelia-loader-default@1.0.3 | +-- aurelia-logging-console@1.0.0 | +-- aurelia-pal@1.3.0 deduped | +-- aurelia-pal-browser@1.4.0 | +-- aurelia-polyfills@1.2.2 | +-- aurelia-router@1.5.0 | +-- aurelia-templating@1.4.2 deduped | +-- aurelia-templating-binding@1.4.1 deduped | +-- aurelia-templating-resources@1.5.0 | -- aurelia-templating-router@1.3.1 +-- aurelia-cli@0.33.1 | +-- aurelia-dependency-injection@1.3.1 | +-- aurelia-logging@1.3.1 | +-- aurelia-polyfills@1.2.2 deduped | +-- esprima@4.0.0 | +-- glob@7.1.2 | +-- npm@5.8.0 | +-- npm-which@3.0.1 | +-- preprocess@3.1.0 | +-- rfc6902@1.3.0 |-- semver@5.4.1 +-- aurelia-dialog@1.0.0-rc.2.0.0 | +-- aurelia-dependency-injection@1.3.1 deduped | +-- aurelia-framework@1.1.4 deduped | +-- aurelia-metadata@1.0.3 deduped | +-- aurelia-pal@1.3.0 deduped | -- aurelia-templating@1.4.2 deduped +-- aurelia-history@1.1.0 +-- aurelia-http-client@1.2.1 | +-- aurelia-pal@1.3.0 deduped |-- aurelia-path@1.1.1 +-- aurelia-i18n@2.1.2 | +-- aurelia-binding@1.2.1 | +-- aurelia-dependency-injection@1.3.1 deduped | +-- aurelia-event-aggregator@1.0.1 deduped | +-- aurelia-loader@1.0.0 | +-- aurelia-logging@1.3.1 deduped | +-- aurelia-metadata@1.0.3 deduped | +-- aurelia-pal@1.3.0 deduped | +-- aurelia-templating@1.4.2 deduped | +-- aurelia-templating-resources@1.5.0 deduped | +-- i18next@9.1.0 | -- intl@1.2.5 +-- aurelia-kendoui-bridge@1.7.0 | +-- aurelia-binding@1.2.1 deduped | +-- aurelia-dependency-injection@1.3.1 deduped | +-- aurelia-logging@1.3.1 deduped | +-- aurelia-metadata@1.0.3 deduped | +-- aurelia-pal@1.3.0 deduped | +-- aurelia-router@1.5.0 deduped | +-- aurelia-task-queue@1.2.0 | +-- aurelia-templating@1.4.2 deduped |-- aurelia-templating-resources@1.5.0 deduped +-- aurelia-route-recognizer@1.1.1 | -- aurelia-path@1.1.1 deduped +-- aurelia-router@1.5.0 | +-- aurelia-dependency-injection@1.3.1 deduped | +-- aurelia-event-aggregator@1.0.1 deduped | +-- aurelia-history@1.1.0 deduped | +-- aurelia-logging@1.3.1 deduped | +-- aurelia-path@1.1.1 deduped |-- aurelia-route-recognizer@1.1.1 deduped +-- aurelia-templating-binding@1.4.1 | +-- aurelia-binding@1.7.1 | +-- aurelia-logging@1.3.1 deduped | -- aurelia-templating@1.4.2 deduped +-- UNMET DEPENDENCY aurelia-templating-resources@1.4.0 +-- aurelia-testing@1.0.0-beta.4.0.0 | +-- aurelia-dependency-injection@1.3.1 deduped | +-- aurelia-framework@1.1.4 deduped | +-- aurelia-logging@1.3.1 deduped | +-- aurelia-pal@1.3.0 deduped |-- aurelia-templating@1.4.2 deduped +-- aurelia-tools@2.0.0 | +-- breeze-dag@0.1.0 | -- through2@2.0.3 deduped +-- aurelia-validation@1.1.3 | +-- aurelia-binding@1.7.1 | +-- aurelia-dependency-injection@1.3.1 deduped | +-- aurelia-logging@1.3.1 deduped | +-- aurelia-pal@1.3.0 deduped | +-- aurelia-task-queue@1.2.0 deduped |-- aurelia-templating@1.4.2 deduped +-- UNMET PEER DEPENDENCY babel-eslint@8.2.3 | +-- @babel/code-frame@7.0.0-beta.44 | +-- @babel/traverse@7.0.0-beta.44 | +-- @babel/types@7.0.0-beta.44 | +-- babylon@7.0.0-beta.44 | +-- eslint-scope@3.7.1 | -- eslint-visitor-keys@1.0.0 +-- bluebird@3.5.1 +-- bootstrap@4.1.0 +-- browser-sync@2.23.7 | +-- browser-sync-ui@1.0.1 | +-- bs-recipes@1.3.4 | +-- chokidar@1.7.0 | +-- connect@3.5.0 | +-- connect-history-api-fallback@1.5.0 deduped | +-- dev-ip@1.0.1 | +-- easy-extender@2.3.2 | +-- eazy-logger@3.0.2 | +-- emitter-steward@1.0.0 | +-- etag@1.8.1 | +-- fresh@0.5.2 | +-- fs-extra@3.0.1 | +-- http-proxy@1.15.2 | +-- immutable@3.8.2 | +-- localtunnel@1.8.3 | +-- micromatch@2.3.11 | +-- opn@4.0.2 | +-- portscanner@2.1.1 | +-- qs@6.2.1 | +-- resp-modifier@6.0.2 | +-- rx@4.1.0 | +-- serve-index@1.8.0 | +-- serve-static@1.12.2 | +-- server-destroy@1.0.1 | +-- socket.io@2.0.4 | +-- ua-parser-js@0.7.12 |-- yargs@6.4.0 +-- connect-history-api-fallback@1.5.0 +-- debounce@1.1.0 +-- eslint@4.19.1 | +-- ajv@5.5.2 | +-- babel-code-frame@6.26.0 | +-- chalk@2.4.0 | +-- concat-stream@1.6.0 | +-- cross-spawn@5.1.0 | +-- UNMET DEPENDENCY debug@3.1.0 | | -- ms@2.0.0 | +-- doctrine@2.1.0 | +-- eslint-scope@3.7.1 deduped | +-- eslint-visitor-keys@1.0.0 deduped | +-- espree@3.5.4 | +-- esquery@1.0.1 | +-- esutils@2.0.2 | +-- file-entry-cache@2.0.0 | +-- functional-red-black-tree@1.0.1 | +-- glob@7.1.2 deduped | +-- globals@11.4.0 | +-- ignore@3.3.7 | +-- imurmurhash@0.1.4 | +-- inquirer@3.3.0 | +-- is-resolvable@1.1.0 | +-- js-yaml@3.10.0 | +-- json-stable-stringify-without-jsonify@1.0.1 | +-- levn@0.3.0 | +-- UNMET DEPENDENCY lodash@4.17.5 | +-- minimatch@3.0.4 deduped | +-- mkdirp@0.5.1 | +-- natural-compare@1.4.0 | +-- optionator@0.8.2 | +-- path-is-inside@1.0.2 | +-- pluralize@7.0.0 | +-- progress@2.0.0 | +-- regexpp@1.1.0 | +-- require-uncached@1.0.3 | +-- semver@5.4.1 deduped | +-- strip-ansi@4.0.0 | +-- strip-json-comments@2.0.1 | +-- table@4.0.2 |-- text-table@0.2.0 +-- event-stream@3.3.4 | +-- duplexer@0.1.1 | +-- from@0.1.7 | +-- map-stream@0.1.0 | +-- pause-stream@0.0.11 | +-- split@0.3.3 | +-- stream-combiner@0.0.4 | -- through@2.3.8 +-- filesize@3.6.1 +-- gulp@4.0.0-alpha.3 (git+https://github.com/gulpjs/gulp.git#71c094a51c7972d26f557899ddecab0210ef3776) | +-- glob-watcher@4.0.0 | +-- gulp-cli@2.0.0 | +-- undertaker@1.2.0 |-- vinyl-fs@3.0.2 deduped +-- gulp-changed-in-place@2.3.0 | -- through2@2.0.3 deduped +-- gulp-notify@3.2.0 | +-- ansi-colors@1.0.1 | +-- fancy-log@1.3.2 | +-- lodash.template@4.4.0 | +-- node-notifier@5.2.1 | +-- node.extend@2.0.0 | +-- plugin-error@0.1.2 |-- through2@2.0.3 deduped +-- gulp-plumber@1.2.0 | +-- chalk@1.1.3 | +-- fancy-log@1.3.2 | +-- plugin-error@0.1.2 deduped | -- through2@2.0.3 deduped +-- gulp-rename@1.2.2 +-- gulp-sass@4.0.1 | +-- chalk@2.4.0 | +-- lodash.clonedeep@4.5.0 | +-- node-sass@4.8.3 | +-- plugin-error@1.0.1 | +-- replace-ext@1.0.0 | +-- strip-ansi@4.0.0 | +-- through2@2.0.3 deduped |-- vinyl-sourcemaps-apply@0.2.1 +-- gulp-sourcemaps@2.6.4 | +-- @gulp-sourcemaps/identity-map@1.0.1 | +-- @gulp-sourcemaps/map-sources@1.0.0 | +-- acorn@5.3.0 | +-- convert-source-map@1.5.1 | +-- css@2.2.1 | +-- debug-fabulous@1.0.0 | +-- detect-newline@2.1.0 | +-- graceful-fs@4.1.11 | +-- source-map@0.6.1 | +-- strip-bom-string@1.0.0 | -- through2@2.0.3 deduped +-- gulp-tslint@8.1.3 | +-- @types/fancy-log@1.3.0 | +-- chalk@2.3.1 | +-- fancy-log@1.3.2 | +-- map-stream@0.0.7 | +-- plugin-error@1.0.1 |-- through@2.3.8 deduped +-- gulp-typescript@4.0.2 | +-- ansi-colors@1.0.1 deduped | +-- plugin-error@0.1.2 deduped | +-- source-map@0.6.1 | +-- through2@2.0.3 deduped | +-- vinyl@2.1.0 | -- vinyl-fs@3.0.2 deduped +-- gulp-watch@5.0.0 | +-- anymatch@1.3.2 | +-- chokidar@2.0.0 | +-- glob-parent@3.1.0 | +-- gulp-util@3.0.8 | +-- object-assign@4.1.1 | +-- path-is-absolute@1.0.1 | +-- readable-stream@2.3.3 | +-- slash@1.0.0 | +-- vinyl@2.1.0 deduped |-- vinyl-file@2.0.0 +-- i18next@11.2.3 +-- i18next-xhr-backend@1.5.1 +-- jasmine-core@3.1.0 +-- jquery@3.3.1 +-- karma@2.0.2 | +-- bluebird@3.5.1 deduped | +-- body-parser@1.18.2 | +-- chokidar@1.7.0 deduped | +-- colors@1.2.1 | +-- combine-lists@1.0.1 | +-- connect@3.6.6 | +-- core-js@2.5.5 | +-- di@0.0.1 | +-- dom-serialize@2.2.1 | +-- expand-braces@0.1.2 | +-- glob@7.1.2 deduped | +-- graceful-fs@4.1.11 deduped | +-- http-proxy@1.15.2 deduped | +-- isbinaryfile@3.0.2 | +-- lodash@4.17.5 | +-- log4js@2.5.3 | +-- mime@1.3.4 | +-- minimatch@3.0.4 deduped | +-- optimist@0.6.1 | +-- qjobs@1.2.0 | +-- range-parser@1.2.0 | +-- rimraf@2.6.2 | +-- safe-buffer@5.1.1 | +-- socket.io@2.0.4 deduped | +-- source-map@0.6.1 | +-- tmp@0.0.33 | -- useragent@2.2.1 +-- karma-chrome-launcher@2.2.0 | +-- fs-access@1.0.1 |-- which@1.3.0 +-- karma-jasmine@1.1.1 +-- karma-typescript-preprocessor@0.3.1 | -- typescript@2.8.3 deduped +-- minimatch@3.0.4 |-- brace-expansion@1.1.8 +-- moment@2.22.1 +-- popper.js@1.14.3 +-- systemjs@0.21.3 +-- systemjs-plugin-text@0.0.11 +-- through2@2.0.3 | +-- readable-stream@2.3.3 deduped | -- xtend@4.0.1 +-- tslint@5.9.1 | +-- babel-code-frame@6.26.0 deduped | +-- builtin-modules@1.1.1 | +-- chalk@2.3.0 | +-- commander@2.14.0 | +-- diff@3.4.0 | +-- glob@7.1.2 deduped | +-- js-yaml@3.10.0 deduped | +-- minimatch@3.0.4 deduped | +-- resolve@1.4.0 | +-- semver@5.4.1 deduped | +-- tslib@1.9.0 |-- tsutils@2.21.0 +-- typescript@2.8.3 +-- uglify-js@3.3.21 | +-- commander@2.15.1 | -- source-map@0.6.1 -- vinyl-fs@3.0.2 +-- fs-mkdirp-stream@1.0.0 +-- glob-stream@6.1.0 +-- graceful-fs@4.1.11 deduped +-- is-valid-glob@1.0.0 +-- lazystream@1.0.0 +-- lead@1.0.0 +-- object.assign@4.1.0 +-- pumpify@1.4.0 +-- readable-stream@2.3.3 deduped +-- remove-bom-buffer@3.0.0 +-- remove-bom-stream@1.2.0 +-- resolve-options@1.1.0 +-- through2@2.0.3 deduped +-- to-through@2.0.0 +-- value-or-function@3.0.0 +-- vinyl@2.1.0 deduped `-- vinyl-sourcemap@1.1.0

StrahilKazlachev commented 6 years ago

If you have a package-lock.json file delete it and then do a clean npm install.

mpoelman commented 6 years ago

Yeah I forgot to mention that, I tried that before (multiple times).

It's not a big issue, but it would be nice to be up-to-date.

Edit: I just found something else, apparently the file 'if.html' cannot be found.

Alexander-Taran commented 6 years ago

@mpoelman can you post you aurelia.json as well?

mpoelman commented 6 years ago
{
  "name": "...",
  "type": "project:application",
  "platform": {
    "id": "web",
    "displayName": "Web",
    "output": "scripts",
    "index": "index.html",
    "baseDir": "."
  },
  "transpiler": {
    "id": "typescript",
    "displayName": "TypeScript",
    "fileExtension": ".ts",
    "dtsSource": [
      "./custom_typings/**/*.d.ts"
    ],
    "source": "src/**/*.ts"
  },
  "markupProcessor": {
    "id": "none",
    "displayName": "None",
    "fileExtension": ".html",
    "source": "src/**/*.html"
  },
  "cssProcessor": {
    "id": "sass",
    "displayName": "Sass",
    "fileExtension": ".scss",
    "source": "src/**/*.scss"
  },
  "editor": {
    "id": "vscode",
    "displayName": "Visual Studio Code"
  },
  "unitTestRunner": {
    "id": "karma",
    "displayName": "Karma",
    "source": "test/unit/**/*.ts"
  },
  "paths": {
    "root": "src",
    "resources": "resources",
    "elements": "resources/elements",
    "attributes": "resources/attributes",
    "valueConverters": "resources/value-converters",
    "bindingBehaviors": "resources/binding-behaviors"
  },
  "testFramework": {
    "id": "jasmine",
    "displayName": "Jasmine"
  },
  "build": {
    "targets": [
      {
        "id": "web",
        "displayName": "Web",
        "output": "scripts",
        "index": "index.html",
        "baseDir": "."
      }
    ],
    "loader": {
      "type": "system",
      "configTarget": "vendor-bundle.js",
      "includeBundleMetadataInConfig": "auto",
      "plugins": [
        {
          "name": "text",
          "extensions": [
            ".html",
            ".css"
          ],
          "stub": false
        }
      ]
    },
    "options": {
      "minify": "stage & prod",
      "sourcemaps": "dev & stage"
    },
    "bundles": [
      {
        "name": "app-bundle.js",
        "source": [
          "[**/*.js]",
          "**/*.{css,html}"
        ]
      },
      {
        "name": "vendor-bundle.js",
        "prepend": [
          "node_modules/bluebird/js/browser/bluebird.js",
          "node_modules/aurelia-cli/lib/resources/scripts/configure-bluebird.js",
          "node_modules/systemjs/dist/system.js",
          "node_modules/jquery/dist/jquery.min.js",
        ],
        "dependencies": [
          "aurelia-binding",
          "aurelia-bootstrapper",
          "aurelia-dependency-injection",
          "aurelia-event-aggregator",
          "aurelia-framework",
          "aurelia-history",
          "aurelia-history-browser",
          "aurelia-loader",
          "aurelia-loader-default",
          "aurelia-logging",
          "aurelia-logging-console",
          "aurelia-metadata",
          "aurelia-pal",
          "aurelia-pal-browser",
          "aurelia-path",
          "aurelia-polyfills",
          "aurelia-route-recognizer",
          "aurelia-router",
          "aurelia-task-queue",
          "aurelia-templating",
          "aurelia-templating-binding"
          {
            "name": "text",
            "path": "../node_modules/systemjs-plugin-text",
            "main": "text"
          },
          {
            "name": "aurelia-templating-resources",
            "path": "../node_modules/aurelia-templating-resources/dist/amd",
            "main": "aurelia-templating-resources"
          },
          {
            "name": "aurelia-templating-router",
            "path": "../node_modules/aurelia-templating-router/dist/amd",
            "main": "aurelia-templating-router"
          },
          {
            "name": "aurelia-testing",
            "path": "../node_modules/aurelia-testing/dist/amd",
            "main": "aurelia-testing",
            "env": "dev"
          },
          {
            "name": "i18next",
            "path": "../node_modules/i18next/dist/umd",
            "main": "i18next"
          },
          {
            "name": "aurelia-i18n",
            "path": "../node_modules/aurelia-i18n/dist/amd",
            "main": "aurelia-i18n"
          },
          {
            "name": "i18next-xhr-backend",
            "path": "../node_modules/i18next-xhr-backend/dist/umd",
            "main": "i18nextXHRBackend"
          },
          {
            "name": "aurelia-http-client",
            "path": "../node_modules/aurelia-http-client/dist/amd",
            "main": "aurelia-http-client"
          },
          {
            "name": "aurelia-validation",
            "path": "../node_modules/aurelia-validation/dist/amd",
            "main": "aurelia-validation"
          },
          {
            "name": "aurelia-dialog",
            "path": "../node_modules/aurelia-dialog/dist/amd",
            "main": "aurelia-dialog"
          },
          "jquery",
          {
            "name": "bootstrap",
            "path": "../node_modules/bootstrap/dist",
            "main": "js/bootstrap.bundle.min",
            "deps": [
              "jquery"
            ],
            "exports": "$",
            "resources": [
              "css/bootstrap.min.css"
            ]
          },
          {
            "name": "aurelia-kendoui-bridge",
            "path": "../node_modules/aurelia-kendoui-bridge/dist/amd",
            "main": "index",
            "resources": [
              "common/*.{js,html}",
              "grid/*.{js,html}",
              "scheduler/*.{js,html}",
              "calendar/*.{js,html}",
              "datepicker/*.{js,html}"
            ]
          },
          {
            "name": "kendo-ui",
            "path": "../node_modules/@progress/kendo-ui",
            "resources": [
              "js/kendo.core.js",
              "js/cultures/kendo.culture.nl-NL.js",
              "js/messages/kendo.messages.nl-NL.js",
              "js/kendo.timezones.js",
              "js/kendo.grid.js",
              "js/kendo.scheduler.js",
              "js/kendo.calendar.js",
              "js/kendo.datepicker.js",
              "css/web/kendo.common.min.css",
              "css/web/kendo.default.min.css",
              "css/web/kendo.material.min.css"
            ]
          },
          {
            "name": "moment",
            "path": "../node_modules/moment",
            "main": "moment"
          },
          {
            "name": "filesize",
            "path": "../node_modules/filesize/lib",
            "main": "filesize"
          }
        ]
      }
    ]
  }
}
mpoelman commented 6 years ago

I tried updating aurelia-templating-resources (and aurelia-templating-router) again. It still doesn't work, but now I get a different error message than before.

Unhandled rejection Error: Invalid resource path [function Compose(element, container, compositionEngine, viewSlot, viewResources, taskQueue) { _initDefineProp(this, 'model', _descriptor, this); _initDefineProp(this, 'view', _descriptor2, this); _initDefineProp(this, 'viewModel', _descriptor3, this); _initDefineProp(this, 'swapOrder', _descriptor4, this); this.element = element; this.container = container; this.compositionEngine = compositionEngine; this.viewSlot = viewSlot; this.viewResources = viewResources; this.taskQueue = taskQueue; this.currentController = null; this.currentViewModel = null; this.changes = Object.create(null); }]. Resources must be specified as relative module IDs. at FrameworkConfiguration.globalResources (http://localhost:9000/scripts/vendor-bundle.js:45629:17) at Object.configure (http://localhost:9000/scripts/vendor-bundle.js:35966:12) at http://localhost:9000/scripts/vendor-bundle.js:45485:36 at tryCatcher (http://localhost:9000/scripts/vendor-bundle.js:5276:23) at Promise._settlePromiseFromHandler (http://localhost:9000/scripts/vendor-bundle.js:3297:31) at Promise._settlePromise (http://localhost:9000/scripts/vendor-bundle.js:3354:18) at Promise._settlePromise0 (http://localhost:9000/scripts/vendor-bundle.js:3399:10) at Promise._settlePromises (http://localhost:9000/scripts/vendor-bundle.js:3479:18) at _drainQueueStep (http://localhost:9000/scripts/vendor-bundle.js:190:12) at _drainQueue (http://localhost:9000/scripts/vendor-bundle.js:183:9) at Async._drainQueues (http://localhost:9000/scripts/vendor-bundle.js:199:5) at Async.drainQueues (http://localhost:9000/scripts/vendor-bundle.js:69:14) printWarning @ bluebird.js:1564 formatAndLogError @ bluebird.js:1280 fireRejectionEvent @ bluebird.js:1305 Promise._notifyUnhandledRejection @ bluebird.js:737 (anonymous) @ bluebird.js:716 setTimeout (async) Promise._ensurePossibleRejectionHandled @ bluebird.js:715 Promise._reject @ bluebird.js:3444 Promise._settlePromise @ bluebird.js:3369 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3475 _drainQueueStep @ bluebird.js:190 _drainQueue @ bluebird.js:183 Async._drainQueues @ bluebird.js:199 Async.drainQueues @ bluebird.js:69 Promise.then (async) schedule @ bluebird.js:4504 Async._queueTick @ bluebird.js:208 AsyncSettlePromises @ bluebird.js:140 Async.settlePromises @ bluebird.js:172 Promise._fulfill @ bluebird.js:3425 Promise._resolveCallback @ bluebird.js:3217 (anonymous) @ bluebird.js:3269 xhr.onload @ aurelia-http-client.js:291 load (async) (anonymous) @ aurelia-http-client.js:288 cancellationExecute @ bluebird.js:1007 Promise._resolveFromExecutor @ bluebird.js:3268 Promise @ bluebird.js:2864 process @ aurelia-http-client.js:274 (anonymous) @ aurelia-http-client.js:818 tryCatcher @ bluebird.js:5276 Promise._settlePromiseFromHandler @ bluebird.js:3297 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromiseCtx @ bluebird.js:3391 _drainQueueStep @ bluebird.js:194 _drainQueue @ bluebird.js:183 Async._drainQueues @ bluebird.js:199 Async.drainQueues @ bluebird.js:69 Promise.then (async) schedule @ bluebird.js:4504 Async._queueTick @ bluebird.js:208 AsyncSettlePromises @ bluebird.js:140 Async.settlePromises @ bluebird.js:172 Promise._fulfill @ bluebird.js:3425 Promise._resolveCallback @ bluebird.js:3217 resolve @ bluebird.js:4922 mightThrow @ jquery.js:3534 process @ jquery.js:3602 setTimeout (async) (anonymous) @ jquery.js:3640 fire @ jquery.js:3268 fireWith @ jquery.js:3398 fire @ jquery.js:3406 fire @ jquery.js:3268 fireWith @ jquery.js:3398 done @ jquery.js:9305 (anonymous) @ jquery.js:9548 load (async) send @ jquery.js:9567 ajax @ jquery.js:9206 jQuery.(anonymous function) @ jquery.js:9355 getJSON @ jquery.js:9336 (anonymous) @ main.ts:87 step @ input.scss:95 (anonymous) @ button.scss:174 (anonymous) @ colors.scss:32 cancellationExecute @ bluebird.js:1007 Promise._resolveFromExecutor @ bluebird.js:3268 Promise @ bluebird.js:2864 __awaiter @ input.scss:40 configure @ main.ts:20 (anonymous) @ aurelia-bootstrapper.js:131 tryCatcher @ bluebird.js:5276 Promise._settlePromiseFromHandler @ bluebird.js:3297 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._resolveCallback @ bluebird.js:3217 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._resolveCallback @ bluebird.js:3217 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._settlePromise @ bluebird.js:3367 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._resolveCallback @ bluebird.js:3217 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._resolveCallback @ bluebird.js:3217 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._resolveCallback @ bluebird.js:3239 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._fulfillPromises @ bluebird.js:3454 Promise._settlePromises @ bluebird.js:3480 Promise._fulfill @ bluebird.js:3423 Promise._settlePromise @ bluebird.js:3367 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 Promise._resolveCallback @ bluebird.js:3217 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 Promise._fulfill @ bluebird.js:3423 PromiseArray._resolve @ bluebird.js:3689 PromiseArray._promiseFulfilled @ bluebird.js:3707 Promise._settlePromise @ bluebird.js:3359 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 _drainQueueStep @ bluebird.js:190 _drainQueue @ bluebird.js:183 Async._drainQueues @ bluebird.js:199 Async.drainQueues @ bluebird.js:69 Promise.then (async) schedule @ bluebird.js:4504 Async._queueTick @ bluebird.js:208 AsyncSettlePromises @ bluebird.js:140 Async.settlePromises @ bluebird.js:172 Promise._fulfill @ bluebird.js:3425 Promise._resolveCallback @ bluebird.js:3217 resolve @ bluebird.js:4922 Promise.then (async) tryCatcher @ bluebird.js:5276 doThenable @ bluebird.js:4912 tryConvertToPromise @ bluebird.js:4877 Promise._resolveCallback @ bluebird.js:3216 Promise._settlePromiseFromHandler @ bluebird.js:3309 Promise._settlePromise @ bluebird.js:3354 Promise._settlePromise0 @ bluebird.js:3399 Promise._settlePromises @ bluebird.js:3479 _drainQueueStep @ bluebird.js:190 _drainQueue @ bluebird.js:183 Async._drainQueues @ bluebird.js:199 Async.drainQueues @ bluebird.js:69 Promise.then (async) schedule @ bluebird.js:4504 Async._queueTick @ bluebird.js:208 AsyncSettlePromises @ bluebird.js:140 Async.settlePromises @ bluebird.js:172 Promise._fulfill @ bluebird.js:3425 Promise._resolveCallback @ bluebird.js:3217 (anonymous) @ bluebird.js:3269 completed @ aurelia-bootstrapper.js:32

I also tried the following combinations of aurelia-templating-resources and aurelia-templating-router, here are the results:

  1. The combination of aurelia-templating-resources@1.4.0 and aurelia-templating-router@1.3.1 works fine
  2. The combination of aurelia-templating-resources@1.7.1 and aurelia-templating-router@1.3.1 does not work
  3. The combination of aurelia-templating-resources@1.4.0 and aurelia-templating-router@1.3.2 does not work
  4. The combination of aurelia-templating-resources@1.7.1 and aurelia-templating-router@1.3.2 does not work
davismj commented 6 years ago

What is your framework version?

mpoelman commented 6 years ago

I just updated to 1.3.0 (I was still on 1.1.4 or something). I get the following error when I launch my app

Unhandled rejection TypeError: this.aurelia.resources.autoRegister is not a function at FrameworkConfiguration.globalResources (http://localhost:9000/scripts/vendor-bundle.js:45694:47) at Object.configure (http://localhost:9000/scripts/vendor-bundle.js:35966:12) at http://localhost:9000/scripts/vendor-bundle.js:45504:36 at tryCatcher (http://localhost:9000/scripts/vendor-bundle.js:5276:23) at Promise._settlePromiseFromHandler (http://localhost:9000/scripts/vendor-bundle.js:3297:31) at Promise._settlePromise (http://localhost:9000/scripts/vendor-bundle.js:3354:18) at Promise._settlePromise0 (http://localhost:9000/scripts/vendor-bundle.js:3399:10) at Promise._settlePromises (http://localhost:9000/scripts/vendor-bundle.js:3479:18) at _drainQueueStep (http://localhost:9000/scripts/vendor-bundle.js:190:12) at _drainQueue (http://localhost:9000/scripts/vendor-bundle.js:183:9) at Async._drainQueues (http://localhost:9000/scripts/vendor-bundle.js:199:5) at Async.drainQueues (http://localhost:9000/scripts/vendor-bundle.js:69:14)

StrahilKazlachev commented 6 years ago

You are not getting all the correct dependencies. .autoRegister is from aurelia-templating@1.8.0. Check your lock files.

mpoelman commented 6 years ago

Hero. I think I somehow ruined my package.json by adding more aurelia packages to it. Basically you only need aurelia-bootstrapper right? I also added aurelia-router, aurelia-templating-resources and such. After cleaning up my package.json and running npm install again, I got it working.

Thanks for the help!

Alexander-Taran commented 6 years ago

Can be closed

czeslav87 commented 5 years ago

Just had the same issue on framework 1.3.0 (updated from 1.1.0) and aurelia-templating 1.10.0. When i locked aurelia-templating version to 1.8.3 it works fine.

Unhandled rejection TypeError: this.aurelia.resources.autoRegister is not a function