0

I am making my custom module with angular-quickstart-lib. And when I run integration script, it throws error:

Error: Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 15:23 in the original .ts file), resolving symbol MetrikaModule.forRoot in D:/Projects/Playground/ng-yandex-metrika/integration/node_modules/ng-yandex-metrika/ng-yandex-metrika.d.ts, resolving symbol AppModule in D:/Projects/Playground/ng-yandex-metrika/integration/src/ap p/app.module.ts, resolving symbol AppModule in D:/Projects/Playground/ng-yandex-metrika/integration/src/app/app.module.ts

My repo is here. You can see the module here and integration test here. To run integration test there is command npm run integration:aot. Can anyone say why this error occurs?

There are a lot of questions on stackoverflow, but they didn't helped. I also have seen this.

Lyubimov Roman
  • 1,269
  • 15
  • 27
  • You should change this static forRoot to a method – Whisher Aug 15 '17 at 20:40
  • @Whisher could you please clarify what do you mean? I think forRoot should be static. For example [here](https://github.com/ng-bootstrap/ng-bootstrap/blob/master/src/dropdown/dropdown.module.ts). And also [this](https://angular.io/guide/ngmodule#configure-core-services-with-coremoduleforroot) – Lyubimov Roman Aug 15 '17 at 20:45
  • Look at it better static forRoot(): is a type and its not a property but a method – Whisher Aug 16 '17 at 06:29
  • Don't get in, why it should be a property? – Lyubimov Roman Aug 16 '17 at 06:56

0 Answers0