angular / flex-layout

Provides HTML UI layout for Angular applications; using Flexbox and a Responsive API
MIT License
5.9k stars 773 forks source link

flex-layout.umd.js is trying to load rxjs/operators.js which is not present #477

Closed nagarajpatil closed 6 years ago

nagarajpatil commented 6 years ago

Bug : flex-layout.umd.js is trying to load rxjs/operators.js which is not present

Getting error after upgrading rxjs to 5.4.3 and flexlayout from 2.0.0-rc.1 to v2.0.0-beta.10 Error loading https://npmcdn.com/rxjs@5.4.3/operators.js as "rxjs/operators" from https://npmcdn.com/@angular/flex-layout@v2.0.0-beta.10/bundles/flex-layout.umd.js

Looks like flex-layout.umd.js is trying to load operators.js which is not present.

nagarajpatil commented 6 years ago

With flexlayout 2.0.0-rc.1 i get below error. Appreciate any help on this. Error: (SystemJS) _angular_core.OpaqueToken is not a constructor TypeError: _angular_core.OpaqueToken is not a constructor at Object.eval (https://npmcdn.com/@angular/flex-layout@2.0.0-rc.1/bundles/flex-layout.umd.js:615:19)

nagarajpatil commented 6 years ago

My system.config.js looks like below /**

bOOm-X commented 6 years ago

If you take a look at the package.json from the sources (not the one you retrieve from the npm package), you will notice: "rxjs": "^5.5.0" rxjs/operators come with the 5.5.0 version (It is not present in the 5.4.3)

alanpurple commented 6 years ago

in systemjs configuration, you need something like this

var map = {
        'app': 'app', // 'dist',
        'rxjs/operators':'lib/rxjs/operators/index.js',
        'rxjs': 'lib/rxjs',
        '@angular': 'lib/@angular'
    };
nagarajpatil commented 6 years ago

Hi All, I noticed @angular/flex-layout release 2.0.0-rc.1 has been renamed to 2.0.0-beta.6 I copied 2.0.0-beta.6 version locally and pinned my site to this location.

Changed below in flex-layout.umd.js (line 615) old: var BREAKPOINTS = new _angular_core.OpaqueToken('fxRawBreakpoints'); new: var BREAKPOINTS = new _angular_core.InjectionToken('fxRawBreakpoints'); I am not getting this OpaqueToken error anymore.

Reason: rxjs 5.4.3 is expecting InjectionToken. FYI: OpaqueToken is deprecated

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.