Why error in Angular 5 as : has no exported member 'OpaqueToken'.?

假如想象 提交于 2019-11-29 11:51:22

The OpaqueToken got removed. You have to use the InjectionToken instead. I am facing the same problem. At the Moment the "best" solution is to replace the tokens after each code-gen build. But thats not a permanent solution.

Please contribute to this issue: https://github.com/swagger-api/swagger-codegen/issues/7324

shailesh

includes folling in the package.json file

"@angular/flex-layout": "^2.0.0-beta.12"

Try deleting the node_modules folder, delete the package.json file then running the following command i hope this problem was resolved

npm install

please refer following link for this issue https://github.com/angular/flex-layout/issues/494#issuecomment-343355178

Please see https://github.com/swagger-api/swagger-codegen/issues/7324#issuecomment-368548716

If you are wanting to use Angular 5, you need to use the version of swagger-codegen that supports version switching.

That this time the lowest stable version of that is 2.3.0

In that you can define (for custom config) ngVersion to whatever version you want. As long as that semVer is above 4.0 it will generate injection token instead of OpaqueToken.

I had this error when I updating angular 4 to 5

I fixed this issue by change package.json file

"@agm/core": "1.0.0-beta.1" to "@agm/core": "1.0.0-beta.5"

after run npm update

This happened when I upgraded to angular 5.2.0. I ended up having to do the following:

Edited package.json: Had to change my version for @angular/compiler-cli. In my case I had to bring it back to 5.2.0, as it somehow got to 5.2.10.

Deleted the node_modules directory.

Ran: npm install

Installed: npm install @angular/flex-layout.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!