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.

Error encountered resolving symbol values statically. Calling function 'InjectionToken'

See original GitHub issue

Hi @eitanp461 😃

Angular removed their deprecated code related to OpaqueToken. Assuming this is why using Angular 4.4.0.RC0 is breaking my codebase.

ERROR in Error: Error encountered resolving symbol values statically. Calling function 'InjectionToken', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol CLOUDINARY_LIB in /Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@cloudinary/angular-4.x/src/cloudinary.module.d.ts, resolving symbol CloudinaryModule.forRoot in /Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@cloudinary/angular-4.x/src/cloudinary.module.d.ts, resolving symbol AppModule in /Users/crash/git/traveliko/traveliko-spa-frontend/src/app/app.module.ts, resolving symbol AppModule in /Users/crash/git/traveliko/traveliko-spa-frontend/src/app/app.module.ts
    at syntaxError (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler/bundles/compiler.umd.js:1729:34)
    at simplifyInContext (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler/bundles/compiler.umd.js:25111:23)
    at StaticReflector.simplify (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler/bundles/compiler.umd.js:25123:13)
    at StaticReflector.annotations (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler/bundles/compiler.umd.js:24553:41)
    at _getNgModuleMetadata (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:138:31)
    at _extractLazyRoutesFromStaticModule (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:109:26)
    at Object.listLazyRoutesOfModule (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/ngtools_impl.js:53:22)
    at Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@angular/compiler-cli/src/ngtools_api.js:91:39)
    at AotPlugin._getLazyRoutesFromNgtools (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@ngtools/webpack/src/plugin.js:207:44)
    at _donePromise.Promise.resolve.then.then.then.then.then (/Users/crash/git/traveliko/traveliko-spa-frontend/node_modules/@ngtools/webpack/src/plugin.js:443:24)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
eitanp461commented, Sep 10, 2017

@bjornharvold Googling this error message indicates that it might be a dependency problem. See https://github.com/angular/angular-cli/issues/5939, https://github.com/angular/angular/issues/16762 and their linked issues.

Have you tried the suggested solutions there? e.g. add to your tsconfig

"@angular/*": ["../node_modules/@angular/*"]

If it still fails, can you provide a sample project that reproduces the problem? (+ Include the node, npm and yarn versions you are using)

Thanks

0reactions
yuricamaracommented, Nov 15, 2017

Thanks @roeeba

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR in Error encountered resolving symbol values ...
ERROR in Error encountered resolving symbol values statically. Calling function 'PerfectScrollbarModule', function calls are not supported.
Read more >
ERROR in Error encountered resolving symbol values ...
Actually I am trying initiate a service when the angular app loads and for that I am calling function of service from app.module.ts...
Read more >
Error encountered resolving symbol values statically
Solution #3: Error encountered resolving symbol values statically. Consider the third complete error mentioned in the Preparing to use webpack section:
Read more >
Error encountered resolving symbol values statically. Only ...
[Solved]-Error: Error encountered resolving symbol values statically. Only initialized variables and constants can be referenced-angular.js.
Read more >
angular/angular-cli - Gitter
ERROR in Error encountered resolving symbol values statically. Calling function 'InjectionToken', function calls are not supported.
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