So I'm currently trying to update my EmberJS application which was originally on version 3.0.2. Firstly I've got the app running on 3.2. I then upgraded further and was greeted with Error: Assertion Failed: Attempting to inject an unknown injection: 'service:-document'
in my browser console.
The app builds successfully using ember serve
but I only get a white screen next to this error, the stacktrace is also absolutely useless. The only mention of such an error is a github issue on ember-wormhole
on a way older ember version and I don't even use this addon in my app. I've also realized that the app dies somewhere after app.js
was executed but none of my initializers get called.
package.json:
"devDependencies": {
"@babel/plugin-transform-block-scoping": "^7.8.3",
"@sentry/browser": "^5.6.3",
"@sentry/integrations": "^5.6.1",
"broccoli-asset-rev": "^2.7.0",
"ember-ajax": "^3.1.0",
"ember-array-contains-helper": "^2.0.0",
"ember-auto-import": "1.3.0",
"ember-bootstrap": "^3.1.1",
"ember-bootstrap-datepicker": "^2.0.1",
"ember-changeset": "^2.2.4",
"ember-changeset-validations": "^2.2.1",
"ember-cli": "~3.6.1",
"ember-cli-active-link-wrapper": "^0.5.0",
"ember-cli-app-version": "^3.2.0",
"ember-cli-babel": "^7.1.2",
"ember-cli-code-coverage": "^0.4.1",
"ember-cli-dependency-checker": "^3.0.0",
"ember-cli-dependency-lint": "^1.0.2",
"ember-cli-eslint": "^4.2.3",
"ember-cli-htmlbars": "^4.2.2",
"ember-cli-icon-rating": "^2.0.1",
"ember-cli-inject-live-reload": "^1.8.2",
"ember-cli-page-object": "^1.11.0",
"ember-cli-sass": "^7.0.0",
"ember-cli-sticky": "^0.6.4",
"ember-cli-string-helpers": "^2.0.0",
"ember-cli-template-lint": "^1.0.0-beta.1",
"ember-cli-uglify": "^2.1.0",
"ember-collapsible-panel": "^3.2.1",
"ember-composable-helpers": "^2.0.1",
"ember-confirm-dialog": "^1.3.0",
"ember-countries": "^2.0.2",
"ember-data": "~3.6.0",
"ember-form-for-intl": "^1.0.6",
"ember-i18n-iso-countries": "^1.5.0",
"ember-keyboard": "^4.0.0",
"ember-keycloak-auth": "~0.3.0",
"ember-load-initializers": "^2.1.1",
"ember-moment": "8.0.0",
"ember-notify": "^5.2.0",
"ember-pikaday": "2.4.1",
"ember-power-select-with-create": "^0.6.0",
"ember-qunit": "^3.4.1",
"ember-resolver": "~5.3.0",
"ember-route-action-helper": "^2.0.3",
"ember-source": "~3.6.0",
"ember-toggle": "^5.3.2",
"eslint-config-prettier": "^4.3.0",
"eslint-plugin-ember": "^5.2.0",
"eslint-plugin-prettier": "^3.1.0",
"husky": "^2.3.0",
"keycloak-js": "^8.0.1",
"lint-staged": "^8.1.7",
"loader.js": "^4.7.0",
"prettier": "1.17.1",
"qunit-dom": "^0.8.0",
"ui-ember-slider": "github:ifad/ui-slider",
"watchman": "^1.0.0"
},
"engines": {
"node": "6.* || 8.* || >= 10.*"
},
"dependencies": {
"@babel/core": "7.8.4",
"bootstrap": "^4.3.1",
"bootstrap-slider": "^10.6.1",
"ember-cli-update": "^0.27.1",
"ember-intl": "^4.2.3",
"global": "^4.4.0",
"jquery": "^3.4.1",
"npm": "^5.7.1",
"popper.js": "^1.16.0",
"to": "^0.2.9",
"update": "^0.7.4"
}
app.js:
import Application from "@ember/application";
import RSVP from "rsvp";
import Resolver from "./resolver";
import loadInitializers from "ember-load-initializers";
import config from "./config/environment";
import $ from "jquery";
window.Promise = RSVP.Promise;
const App = Application.extend({
modulePrefix: config.modulePrefix,
podModulePrefix: config.podModulePrefix,
Resolver
});
$.getJSON("/api/env_settings", function(envSettings) {
config.sentryDsn = envSettings.sentry;
config.keycloak.url = envSettings.keycloak.url;
config.keycloak.realm = envSettings.keycloak.realm;
config.keycloak.clientId = envSettings.keycloak.clientId;
config.keycloak.secret = envSettings.keycloak.secret;
config.helplink = envSettings.helplink;
config.keycloak.disable = envSettings.keycloak.disable;
});
loadInitializers(App, config.modulePrefix);
export default App;
Any ideas where the cause of this problem lies?
Aucun commentaire:
Enregistrer un commentaire