Upgrade to wijmo 5.20181.462

Posted by: daniel.boone on 18 May 2018, 6:23 am EST

    • Post Options:
    • Link

    Posted 18 May 2018, 6:23 am EST

    I have been trying to upgrade my project for wimo 5.20173.403 to the latest and having all kinds of issues.

    first i removed all the files that were referenced before then removed the reference in package.config and then the npm command, that caused an issue with rxjs-compat so i had to npm install rxjs-compat. once i did that i have to change all the

    import { Observable } from ‘rxjs/Observable’; to import { Observable } from ‘rxjs/Rx’; i have been unable to get around the next error.

    Error: Unexpected token <

    Evaluating http://localhost:5555/rxjs/Rx

    Evaluating http://localhost:5555/app/shared/common/baseComponent.js

    Evaluating http://localhost:5555/app/shared/index.js

    Evaluating http://localhost:5555/app/applicationAdmin/home/home.component.js

    Evaluating http://localhost:5555/app/applicationAdmin/index.js

    Evaluating http://localhost:5555/app/app.routes.js

    Evaluating http://localhost:5555/app/app.module.js

    Evaluating http://localhost:5555/app/main.js

    Loading app/main

    here is the code i think it’s having an issue with

    
    import { OnDestroy } from '@angular/core';
    // import { Subject } from 'rxjs/Subject';
    import { FormControl } from '@angular/forms';
    import { Observable, Subject } from 'rxjs/Rx';
    import { Utils } from '../../shared/index';
    
    export class BaseComponent implements OnDestroy {
    
        private _ngUnsubscribe = new Subject();
    
        ngUnsubscribe = this._ngUnsubscribe.asObservable();
    
    
        ngOnDestroy() {
            this._ngUnsubscribe.next();
            this._ngUnsubscribe.complete();
        }
        loadDropDown($obs: Observable<any>, field?: FormControl, prop?: string): Observable<any> {
            return $obs.takeUntil(this.ngUnsubscribe)
                .map(b => Utils.wj.setValue(b, field, prop));
        }
        monitorChanges(field: FormControl) {
            return field.valueChanges
                .takeUntil(this.ngUnsubscribe)
                .debounceTime(500)
                .distinctUntilChanged();
        }
    }
    
    
    

    Any help would be appreciated.

  • Posted 18 May 2018, 9:33 am EST

    wijmo 5.20181.462 uses angualr 6, I would suggest following https://update.angular.io/ for angualr 6 before updating wijmo. Also when you update angular you will update to rxjs 6 as well, the new import for that is

    import { Observable, Subscription } from 'rxjs';

  • Posted 20 May 2018, 7:34 pm EST

    Hi Daniel,

    Could you please share Angular version for your project?

    If We are correct, the following statement is for Wijmo only not for other files.

    first i removed all the files that were referenced before then removed the reference in package.config

    If yes, the errors may be because of rxjs incompatible version. Please try after updating with compatible version for rxjs.

    If the issue persists, please share a demo sample depicting your issue.

    ~Manish

  • Posted 20 May 2018, 7:35 pm EST

    @w.lohan,

    Thank you for suggestion.

    Wijmo files are compatible with previous angular version too.

    ~Manish

  • Posted 20 May 2018, 11:11 pm EST

    I am using angular 6.0.1, what version of rxjs do i need to use? I am currently using rxjs: 6.1.0 and rxjs-compat: 6.1.0

    and types/react: 16.0.34

  • Posted 20 May 2018, 11:13 pm EST

    if you look at my code you will see that I’m already importing the new way for rxjs:

    import { Observable, Subject } from ‘rxjs/Rx’;

  • Posted 21 May 2018, 6:12 am EST

    I found the issue, angular 6 and rxjs 6 break our projects. So had to revert those parts until have time to update the issues.

  • Posted 21 May 2018, 1:50 pm EST

    Thanks Daniel for notifying us.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels