o2r-project / o2r-platform

⚠️ Project discontinued ⚠️ See https://github.com/o2r-project/o2r-UI
http://o2r.info/results/
Apache License 2.0
2 stars 8 forks source link

Premature Migration to AngularJS v1.7 due to weak versioning leads to Platform failure #187

Closed Timmimim closed 6 years ago

Timmimim commented 6 years ago

Today I installed a freshly pulled o2r-platform and it's dependencies on our giw-stml Desktop/Test-Server. The Server runs on a Ubuntu 16.4LTS and features freshly installed versions of nodejs v8.11.2. npm v5.6.0. and, perhaps most importantly. bower v1.8.4.

When installing the Bower components for the platform, bower automatically picked the new minor version AngularJS 1.7.0, and matching dependencies (most notably angular-sanitize v1.7.0). However, this jump to the next minor version lead to a blanc white screen and the platform apparently not working.

A quick look into Browser Devtools revealed:

Error: [$injector:modulerr] Failed to instantiate module starter due to:
$compileProvider.preAssignBindingsEnabled is not a function
config@http://localhost/app/app.js:46:9
invoke@http://localhost/bower_components/angular/angular.js:5093:16
runInvokeQueue@http://localhost/bower_components/angular/angular.js:4982:11
loadModules/<@http://localhost/bower_components/angular/angular.js:4992:11
[...]

And a quick Google search lead to a chapter in the AngularJS docs, explaining how to migrate to AngularJS v1.7 (https://docs.angularjs.org/guide/migration).

When reverting to Version 1.6.9, a new Error appeared, as the dependency angular-sanitize had also been lifted to Version 1.7.0 and was now no longer compatible.

Error: [$injector:modulerr] Failed to instantiate module starter due to:
[$injector:modulerr] Failed to instantiate module ngSanitize due to:
q is not a function
B@http://localhost/bower_components/angular-sanitize/angular-sanitize.min.js:6:289
f@http://localhost/bower_components/angular-sanitize/angular-sanitize.min.js:6:217
[...]

Since any less experienced user may likely assume a broken platform upon encountering this, we either need to migrate the o2r-platform, OR make sure it does not / cannot decide to do so on its own.

The error originates from o2r-platform/bower.json and thus o2r-platform/client/bower_components/[dependency].

Thoughts?