Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observable error ? (Return type of public method from exported class has or is using name 'Observable' from external module ) #125

Closed
dmastag opened this issue Sep 29, 2016 · 3 comments
Assignees
Milestone

Comments

@dmastag
Copy link
Contributor

dmastag commented Sep 29, 2016

Hi There,
Ionic2 just released version RC0 which is using Angular2, and when I tried it with the SDK I got the errors below. Since they are showing in the sdk folder I wondered if this problem is with the SDK or with Ionic2. Any pointers would be appreciated. (Still learning ngModule so not understanding it might also be the problem)

[10:39:52]  lint finished in 1.93 s
[10:39:55]  src/shared/sdk/services/core/base.service.ts(44,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/core/error.service.ts(11,10): error TS4053: Return type of public method from exported class has or is using name 'ErrorObservable' from external module "C:/playground/ionic2test/node_modules/rxjs/observable/ErrorObservable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Email.ts(49,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Email.ts(80,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(48,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(77,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(106,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(132,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(161,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(193,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(222,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(250,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(277,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(305,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(331,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Feed.ts(361,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(391,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Feed.ts(421,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Register.ts(47,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Register.ts(74,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(48,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(75,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(109,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(141,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(173,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(199,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(227,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(257,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(286,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(315,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(341,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(370,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(402,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(431,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(459,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(486,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(514,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(540,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(570,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(600,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(639,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(675,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(703,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(731,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/User.ts(762,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/User.ts(793,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Userpersonal.ts(48,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(77,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Userpersonal.ts(106,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Userpersonal.ts(132,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Userpersonal.ts(161,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(193,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(222,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(250,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(277,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(305,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Userpersonal.ts(331,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(361,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
src/shared/sdk/services/custom/Userpersonal.ts(391,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
[10:39:55]  src/shared/sdk/services/custom/Userpersonal.ts(421,10): error TS4053: Return type of public method from exported class has or is using name 'Observable' from external module "C:/playground/ionic2test/node_modules/rxjs/Observable" but cannot be named.
@jonathan-casarrubias
Copy link
Collaborator

Hi @dmastag thanks for reaching me out, it seems that the rxjs module "Observable" is not found or somthing like that, not sure why it says "cannot be named" I haven't seen that error before, I will try to replicate this issue.

@dmastag
Copy link
Contributor Author

dmastag commented Sep 30, 2016

Ok, let me know if you need any info from me.

@michaelscheel
Copy link

Importing Observable in your service files (/services/custom) fixes the problem:
import { Observable } from 'rxjs/Observable';

Additionally you have to import it in base.service.ts. The file error.service.ts requires importing ErrorObservable as following.
import { ErrorObservable } from 'rxjs/observable/ErrorObservable';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants