Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bjornharvold opened this issue Sep 9, 2017 · 5 comments

Comments

@bjornharvold
Copy link

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)
@eitanp461
Copy link
Contributor

@bjornharvold Googling this error message indicates that it might be a dependency problem.
See angular/angular-cli#5939, angular/angular#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

@bjornharvold
Copy link
Author

Resolved with Angular 4.4.1

@yuricamara
Copy link

yuricamara commented Nov 14, 2017

Same problem with Angular 5 when building with AOT.

@roeeba
Copy link
Collaborator

roeeba commented Nov 15, 2017

Hi @yuricamara. Please follow the Angular 5 compatibility thread - #114
We're doing our best to resolve this ASAP.

@yuricamara
Copy link

Thanks @roeeba

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants