I've been researching and searching for days about this problem, but haven't been able to find a solution although various variants have been posted online.
When I try to compile my application with the Angular CLI in production mode, I get the following error:
Error encountered resolving symbol values statically. Calling function 'FluffySpoonAuthenticationModule', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol AppModule in app.module.ts, resolving symbol AppModule in app.module.ts
Here's the relevant parts of app.module.ts
.
import { FluffySpoonAuthenticationModule } from '@fluffy-spoon/angular.authentication.jwt';
@NgModule({
imports: [
FluffySpoonAuthenticationModule.forRoot('foo')
]
})
export class AppModule {}
Now, obviously in the imports section, I am calling a method. But since I need to specify a dynamic string value as part of the module, I need to be able to somehow call a method for configuring that part. Besides, why would it work with other forRoot
calls and not mine, right?
The source codes for FluffySpoonAuthenticationModule are here: https://github.com/ffMathy/FluffySpoon.Angular.Authentication.Jwt/
I am using the command ionic cordova build android --prod