Aurelia bundle: error loading "aurelia-cli"

503 Views Asked by At

When I run aurelia's bundler I get the following error:

D:\Code\Test>aurelia bundle
info: Using Aureliafile: D:\Code\Test\aureliafile.js
info: Creating bundle ...
Potentially unhandled rejection [6] Error: Error loading "aurelia-cli" at file:D:/Code/Test/aurelia-cli.js
Error loading "aurelia-cli" from "aureliafile" at file:D:/Code/Test/aureliafile.js
ENOENT, open 'D:\Code\Test\aurelia-cli.js'
    at Error (native)
1

There are 1 best solutions below

0
On BEST ANSWER

The problem is a combination of having set "*" : "*.js" in System.Config and using the "*" wildcard telling aurelia bundle to pull in everything. This turns out to try to include the project root files. You can either be more specific to the bundler:

aureliafile.js:

"dist/app-bundle": {
    modules: [
      'dist/*',
      ...

or reapply the jspm mapping "*" : "dist/*.js". Unfortunatly what I need is actually one configuration during development (bundling) and another during production (serving).

related issues: