Error encountered resolving symbol values statically. Calling function 'InjectionToken'
See original GitHub issueHi @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:
- Created 6 years ago
- Comments:5
Top 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 >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
@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
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
Thanks @roeeba