Flex-layout: Module '"../node_modules/@angular/core/core"' has no exported member 'OpaqueToken'.

Created on 31 Jan 2018  路  8Comments  路  Source: angular/flex-layout

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

duplicate

Most helpful comment

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

All 8 comments

Duplicate of #494

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

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...

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.

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

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

Thanks, @iftikharkhan89 you are a lifesaver.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

JadedEric picture JadedEric  路  4Comments

intellix picture intellix  路  4Comments

mhosman picture mhosman  路  3Comments

manuelbachl picture manuelbachl  路  5Comments

spottedmahn picture spottedmahn  路  5Comments