Open mydea opened 3 years ago
What version of ember-auto-import?
What were you changing when this problem appeared?
Not 100% sure, as the app did not fail (and tests passed), the error is only visible in the console (which I only just noticed).
I would guess it happend when upgrading from ember-auto-import 1.x to 2.x - I just tried downgrading it and the error went away!
I will try to see if I can get a reproduction somehow...!
OK, after a lot of trial and error, I found the culprit!
In this app, defer
was added to the vendor JS file in index.html:
<script src="{{rootURL}}assets/vendor.js" defer></script>
As it uses fastboot/prember and thus does not need the JS to work.
It works if:
defer
/tests
it also does not trigger the errorHere is a reproduction repo: https://github.com/mydea/ember-issue-reproductions/commit/4948624aa766b1d12edc067b545e0d096a630d13
We need to find a clearer place to document this, but this is a known limitation, see https://github.com/ef4/ember-auto-import#customizing-build-behavior:
publicAssetURL
: the public URL to your /assets directory on the web. Many apps won't need to set this because we try to detect it automatically, but you will need to set this explicitly if you're deploying your assets to a different origin than your app (for example, on a CDN) or if you are using Githubissues.Githubissues is a development platform for aggregating issues.
I have an app that is not using ember-auto-import in its application code (as far as I can tell).
I noticed that I get a runtime error:
Where
l.js
is:When I remove
ember-auto-import
from my devDependencies, the error goes away.I would just remove it, but according to https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md it is needed for ember-qunit for the tests (although the tests do work without it, as far as I can tell :thinking: )