2

I have updated my ionic project to angular 5 and i got the below error with many ionic native plugins..

angular/core/core"' has no exported member 'OpaqueToken

Resolved all of the issues after updating to the latest version , except for ionic-storage. Still its giving this error

node_modules/@ionic/storage/es2015/storage.d.ts import { OpaqueToken } from '@angular/core';

node_modules/@angular/core/core"' has no exported member 'OpaqueToken'.

We can see one open issue @github (142) but no fix or workaround found.

Arjun T Raj
  • 3,187
  • 1
  • 21
  • 44

1 Answers1

4

You can solve this issue by upgrading @ionic/storage to version 2.1.2 or higher.

Update (context):

OpaqueToken was removed in Angular v5 (it's been deprecated since Angular v4). The corresponding change in the @ionic/storage package was done in this change as part of the 2.1.2 update.

Ntokozo Zwane
  • 1,572
  • 14
  • 20
  • Can you explain why upgrading would solve the issue? Is there a known bug, that you can link to? – Artjom B. May 05 '18 at 09:03
  • @MunimMunna Exactly why do you think this is not an answer? Because it is. It could have used some background or explanation, but it is an answer. – Mark Rotteveel May 05 '18 at 09:05
  • @MarkRotteveel this may be an answer, but looks like a direction with no context or assurance. Only way to find out is upgrading something you may even don't need to, not appreciated at all! And this one liner could fit really well in a comment. – Munim Munna May 05 '18 at 09:25
  • @MunimMunna apologies for not being thorough in my answer, I've added some context to my original post. – Ntokozo Zwane May 05 '18 at 09:49
  • Now this is an answer, even me who has no idea of Angular 5 understand it. – Munim Munna May 05 '18 at 09:53
  • @MunimMunna Sure, but that would warrant a downvote, not deletion. As it (attempts to) answer the question. Comments are for requests for clarification or remarks tangential to the problem. Comments are not for answers. – Mark Rotteveel May 05 '18 at 10:18