aurelia / aurelia/cli

Karma 404 Error when using multiple bundles

Open
#689 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
402
Forks
134
PR merge metrics
No merged PRs in 30d

Description

**Environment**
PS > node -v
v6.10.2
PS > npm -v
4.2.0
PS > au -v
0.30.1
PS > yarn -v
yarn install v0.27.5

[This fix](https://github.com/aurelia/cli/issues/685) did not work for me but i'm pretty sure it's because I'm using multiple bundles as well (related [to this](https://github.com/aurelia/cli/issues/203))... When i revert [this change](https://github.com/diegohb/aurelia-leaflet-cluster/commit/11a792cad8cbc1f4b1c0bf98cf1820769d89c70f) to split the bundles, i don't see any error running tests with AU TEST.

my repro code that shows the bug running AU TEST: https://github.com/diegohb/aurelia-leaflet-cluster/commit/ac15017d6b35432eb32fffa7b4417083703b47a4

The error stack trace:

>
> Chrome 60.0.3112 (Windows 10 0.0.0) WARN: '%cUnhandled rejection Error: Fetch error: 404 Not Found
> Instantiating http://localhost:9876/scripts/infra.vendor-bundle.js
> Loading infra.vendor-bundle
> Instantiating http://localhost:9876/jquery
> Loading http://localhost:9876/app
> Loading http://localhost:9876/base/src/app
> Loading http://localhost:9876/base/test/unit/app.spec.js
> Loading /base/test/unit/app.spec.js
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:10911
> at Be (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:29826)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:28855
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:28832
> at Ve.Ne (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:27839)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:3425
> at h (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:3375)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:3105
> at p (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:2933)
> at Ve.f.(anonymous function) (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:38868)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:37134
> at Ve.i.import (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:37106)
> at Ve.import (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:45333)
> at $e (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:29557)
> at Ve.Ne (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:27821)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:3425
> at h (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:3375)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:4390
> at m (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:4178)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:5123
> at
> at b (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:5031)
> at b (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:5485)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:39047
> at Ve.f.(anonymous function) (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:38881)
> at http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:37134
> at
> at Ve.i.import (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:37106)
> From previous event:
> at Ve.i.import (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:37155)
> at Ve.import (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:45333)
> at t (http://localhost:9876/base/scripts/infra.au-bundle.js?81ea27d4adf8910301fc985616f337965fd87a7a:3788:41401)
> at setTimeout (http://localhost:9876/base/test/aurelia-karma.js?2d2dcb7b71d474594d132e8787cfdb18ee81c977:43:22)', 'color: red'
>
> 08 08 2017 16:54:24.331:WARN [Chrome 60.0.3112 (Windows 10 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
>
> { uid: 11,
> name: 'karma',
> branch: false,
> error: 1,
> duration: [ 19, 747161702 ],
> time: 1502225664858 }
> { uid: 0,
> name: '',
> branch: true,
> error: 1,
> duration: [ 25, 649736261 ],
> time: 1502225664860 }
> 1

Could be a karma config issue ?

I believe the following is a similar setup:
-https://www.jujens.eu/posts/en/2016/Aug/17/switch-to-aurelia-cli/
-https://github.com/MattGiesa/aurelia-multiple-bundle-example

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.