Hello guys! I try to use rxjs with operators
I try to do that with rxjs version 6.6.7
for import modules I use this code
import {default as rxjs} from “rxjs”;
import {default as rxjs_operators} from “rxjs/operators”;const {range} = rxjs;
const {map, filter} = rxjs_operators;
and in start function of script I try to run this code
range(1, 200)
.pipe(
filter(x => x % 2 === 1),
map(x => x + x)
)
.subscribe(x => console.log(x));
but I get error
Failed to resolve rxjs/operators from file:///<my_project_path>/assets/test.ts, treat it as external dependency.
Which is caused by: Error: Directory import is not supported
Could you explain how I can managed in my situation?
P.S. if I try to use rxjs version 7.1.0 I get another error
[Scene] Packed resource node_modules/rxjs/dist/esm5/index.js not found.
[Scene] Packed resource node_modules/rxjs/dist/esm5/operators/index.js not found.
but I checked that paths of files exists.
P.P.S. I rad this topic but, I can’t find out resolution of my problem. Thank you!