question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng serve ERROR OpaqueToken resolving CLOUDINARY_LIB

See original GitHub issue

I’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:closed
  • Created 6 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
tockercommented, May 22, 2017

@trencoret and all, please update the dependency to “@cloudinary/angular-4.x” version “1.0.0”. Let us know if it solves your issue!

1reaction
mflorence99commented, Apr 25, 2017

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.

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found