ng serve ERROR OpaqueToken resolving CLOUDINARY_LIB
See original GitHub issueI’m getting the following error:
ERROR in Error encountered resolving symbol values statically. Calling function 'OpaqueToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol CLOUDINARY_LIB in /home/mike/Development/angular2-cloudinary-progressive-web-app/node_modules/@cloudinary/angular/src/cloudinary.module.d.ts, resolving symbol CloudinaryModule.forRoot in /home/mike/Development/angular2-cloudinary-progressive-web-app/node_modules/@cloudinary/angular/src/cloudinary.module.d.ts, resolving symbol AppModule in /home/mike/Development/angular2-cloudinary-progressive-web-app/src/app/app.module.ts, resolving symbol AppModule in /home/mike/Development/angular2-cloudinary-progressive-web-app/src/app/app.module.ts
The code in question is
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { RouterModule } from '@angular/router';
import { Cloudinary } from 'cloudinary-core';
import { CloudinaryModule } from '@cloudinary/angular';
import { AppComponent } from './app.component';
import { PhotoThumbComponent } from './photo-thumb/photo-thumb.component';
import { HomeComponent } from './home/home.component';
import { ViewComponent } from './view/view.component';
import { routes } from './app.routes';
export const cloudinaryLib = {
Cloudinary: Cloudinary
};
@NgModule({
declarations: [
AppComponent,
PhotoThumbComponent,
HomeComponent,
ViewComponent
],
imports: [
BrowserModule,
FormsModule,
HttpModule,
CloudinaryModule.forRoot(cloudinaryLib, { cloud_name: 'elsmore-me'}),
RouterModule.forRoot(routes)
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
I can’t see anything wrong, and even more confusingly it’ll build if I just save at random
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
I have a new project, but when execute ng serve, I get error
I have tryed with ng update @angular/cli, now i get this error: This version of CLI is only compatible with Angular version 5.0.0...
Read more >ng serve - Angular
Option Description Value Type Default Value
‑‑hmr Enable hot module replacement. boolean false
‑‑host Host to listen on. string localhost
‑‑open Opens the url in default...
Read more >ng: command not found (Angular) error [Solved] | bobbyhadz
To solve the error ng: command not found, install the angular cli package globally ... ng new my-project # 👇️ run the application...
Read more >Ways to fix “-bash: ng: command not found” - Medium
This problem is caused due to the reason that npm is unable to find ng. There are few ways that we can follow...
Read more >Angular CLI - ng serve Command - Tutorialspoint
Sr.No. Option & Syntax Description
2 ‑‑aot=true|false Build using Ahead of Time compilation.
3 ‑‑baseHref=baseHref Base url for the application being built.
7 ‑‑deployUrl=deployUrl URL where...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@trencoret and all, please update the dependency to “@cloudinary/angular-4.x” version “1.0.0”. Let us know if it solves your issue!
I started to see this issue repeatedly so based on the notes above I backed off to
"cloudinary-core": "2.2.1"
– but sadly the error is still there.