javascript - Cannot import module after update to Angular 4 -
i'm having issue importing shared module written in angular angular app. v2.4.9 works fine after update v4.0.x error rxjs.
error in ...../app/node_modules/app-common/src/app/shared/services/api.service.ts (30,14): property 'catch' not exist on type 'observable<any>'. ...../app/node_modules/app-common/src/app/shared/services/api.service.ts (39,14): property 'catch' not exist on type 'observable<response>'. ...../app/node_modules/app-common/src/app/shared/services/api.service.ts (49,14): property 'catch' not exist on type 'observable<response>'. ...../app/node_modules/app-common/src/app/shared/services/api.service.ts (58,14): property 'catch' not exist on type 'observable<response>'.
here's thing: have 2 directories - /app-common , /app - importing shared module via 'npm link' can reach in /app/node_modules/app-common/ directory. having issues before , had place "paths" section in tsconfig.json file point angular , rxjs modules. tried make new project using stable angular-cli v1.0.0 , @angular@4.0.0 same error. strange thing when change file adding space character , save, webpack recompiling source , works after change, not after running first time. can guess - 'ng build' command giving me same error.
ps. yes - have imported operators rxjs , when trying import of them via:
import { observable } 'rxjs/rx';
nothing changes - still error.
any ideas?
Comments
Post a Comment