show full lookup path somewhere on missing dependecy
@xenoterracide commented on Sat Jul 30 2016
I'm submitting a feature request
- Library Version: 1.0.1
% uname -a && node -v && npm -v && google-chrome-stable --version
Linux slave-vi 4.6.4-1-ARCH #1 SMP PREEMPT Mon Jul 11 19:12:32 CEST 2016 x86_64 GNU/Linux
v6.3.1
3.10.3
Google Chrome 52.0.2743.82
- Language: all | TypeScript X.X | ESNext
Current behavior:
vendor-bundle.js:3675 Uncaught TypeError: h.load is not a function
vendor-bundle.js:1335 Unhandled rejection Error: Failed loading required CSS file: material.blue-red.min.css
at fixupCSSUrls (http://localhost:9000/scripts/vendor-bundle.js:23247:13)
at http://localhost:9000/scripts/vendor-bundle.js:23286:16
From previous event:
at CSSResource.load (http://localhost:9000/scripts/vendor-bundle.js:23285:10)
at ResourceDescription.load (http://localhost:9000/scripts/vendor-bundle.js:18906:28)
at ResourceModule.load (http://localhost:9000/scripts/vendor-bundle.js:18855:37)
at http://localhost:9000/scripts/vendor-bundle.js:19216:43
From previous event:
at ViewEngine.importViewResources (http://localhost:9000/scripts/vendor-bundle.js:19185:52)
at ViewEngine.loadTemplateResources (http://localhost:9000/scripts/vendor-bundle.js:19155:19)
at http://localhost:9000/scripts/vendor-bundle.js:19103:41
From previous event:
at ViewEngine.loadViewFactory (http://localhost:9000/scripts/vendor-bundle.js:19087:67)
at ConventionalViewStrategy.loadViewFactory (http://localhost:9000/scripts/vendor-bundle.js:16507:25)
at HtmlBehaviorResource.load (http://localhost:9000/scripts/vendor-bundle.js:19840:29)
at http://localhost:9000/scripts/vendor-bundle.js:20373:18
From previous event:
at CompositionEngine.createController (http://localhost:9000/scripts/vendor-bundle.js:20361:71)
at CompositionEngine._createControllerAndSwap (http://localhost:9000/scripts/vendor-bundle.js:20340:19)
at CompositionEngine.compose (http://localhost:9000/scripts/vendor-bundle.js:20420:21)
at TemplatingEngine.compose (http://localhost:9000/scripts/vendor-bundle.js:20684:38)
at Aurelia.setRoot (http://localhost:9000/scripts/vendor-bundle.js:10275:21)
at http://localhost:9000/scripts/app-bundle.js:55:59
From previous event:
at Object.configure (http://localhost:9000/scripts/app-bundle.js:55:25)
at http://localhost:9000/scripts/vendor-bundle.js:9148:29
From previous event:
at config (http://localhost:9000/scripts/vendor-bundle.js:9147:48)
at handleApp (http://localhost:9000/scripts/vendor-bundle.js:9138:12)
at http://localhost:9000/scripts/vendor-bundle.js:9167:13
From previous event:
at http://localhost:9000/scripts/vendor-bundle.js:9165:40
From previous event:
at http://localhost:9000/scripts/vendor-bundle.js:9164:29
From previous event:
at run (http://localhost:9000/scripts/vendor-bundle.js:9160:26)
at Object.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:9187:3)
at Object.execCb (http://localhost:9000/scripts/vendor-bundle.js:3683:299)
at Object.check (http://localhost:9000/scripts/vendor-bundle.js:3672:50)
at Object.enable (http://localhost:9000/scripts/vendor-bundle.js:3677:58)
at Object.enable (http://localhost:9000/scripts/vendor-bundle.js:3681:433)
at Object.<anonymous> (http://localhost:9000/scripts/vendor-bundle.js:3676:436)
at http://localhost:9000/scripts/vendor-bundle.js:3661:140
at y (http://localhost:9000/scripts/vendor-bundle.js:3660:207)
at Object.enable (http://localhost:9000/scripts/vendor-bundle.js:3675:469)
at Object.init (http://localhost:9000/scripts/vendor-bundle.js:3670:154)
at http://localhost:9000/scripts/vendor-bundle.js:3680:308
- What is the motivation / use case for changing the behavior?
It's obvious to me that this is because I've misdefined paths in aurelia.json but it's not clear to me exactly what I've done wrong, printing out the path that it's trying to open server side would be helpful.
Also more complete documentation of aurelia.json would be nice.
Firefox console show: "TypeError: plugin.load is not a function" when aurelia attempt load css-resources (that's why error "Failed loading required CSS file" raise).
After some research I found that SO post about that error.
Author found solution in comments to first post: 28 Jul, to dynamically require text requires setting stub:false in the text plugin at aurelia.json > build.loader.plugins.
After change stub value to false in aurelia.json -- work fine for me. Bug is gone and app work correct.
@huochunpeng this should be pretty much obsolete with the new auto-tracer right?
Not by me, but current cli stubs text! plugin to throw a readable exception.
define({load: function(id){throw new Error("Dynamic load not allowed: " + id);}});