flex-layout icon indicating copy to clipboard operation
flex-layout copied to clipboard

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

Open amar-muratovic opened this issue 8 years ago • 8 comments

Dear all,

this is one of the errors that I have when I type in ionic serve in CMD. I was trying a different kind of things to solve this but without success.

ERROR: import { ModuleWithProviders, OpaqueToken } from '@angular/core';

ENVIROMENT: Ionic Framework: 3.9.2 Ionic App Scripts: 3.1.8 Angular Core: 5.0.3 Angular Compiler CLI: 5.0.3 Node: 6.10.3 OS Platform: Windows 10 Navigator Platform: Win32 User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36

amar-muratovic avatar Jan 31 '18 17:01 amar-muratovic

Duplicate of #494

CaerusKaru avatar Jan 31 '18 18:01 CaerusKaru

Please review the linked issue for the solution. Again, this is a duplicate issue.

CaerusKaru avatar Jan 31 '18 18:01 CaerusKaru

Okay @CaerusKaru but please I'm not stupid I'm just trying to get a solution. I was Googling for the solution but without success...

amar-muratovic avatar Jan 31 '18 18:01 amar-muratovic

Your problem is that you have the RC.1 version installed, which is solved by following the steps specified for solution in the linked issue. You need to install the @latest version, and make sure not to run npm update on the package.

CaerusKaru avatar Jan 31 '18 19:01 CaerusKaru

I solved this by replacing

OpaqueToken

with

InjectionToken

import { InjectionToken } from '@angular/core';

My Environment settings are Angular CLI: 1.7.3 Node: 9.8.0 OS: darwin x64 Angular: 5.2.9

iftikharkhan89 avatar Mar 28 '18 10:03 iftikharkhan89

Thanks @iftikharkhan89. This was not a duplicate, at least not with the one that is linked.

KogAtlas avatar Sep 05 '18 16:09 KogAtlas

Thanks, @iftikharkhan89 you are a lifesaver.

Mutondi avatar Dec 10 '18 11:12 Mutondi

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.