Skip to content
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

Error encountered resolving symbol values statically resolving symbol RestangularConfigFactory #1

Open
vichanse opened this issue Oct 7, 2017 · 5 comments

Comments

@vichanse
Copy link

vichanse commented Oct 7, 2017

I am having this error when using the service generator
ERROR in 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 4:10 in
the original .ts file), resolving symbol RestangularConfigFactory in RestangularConfigFactory.ts, resolvi
ng symbol AppModule in src/app/app.module.ts, resolving symbol AppModule in /src/app/app.module.ts, resolving symbol AppModule in src/app/app.module.ts
at positionalError (\node_modules
@angular\compiler\bundles\compiler.umd.js:25266:35)
at simplifyInContext (\node_module
s@angular\compiler\bundles\compiler.umd.js:25109:27)
at StaticReflector.simplify (\node
_modules@angular\compiler\bundles\compiler.umd.js:25123:13)
at StaticReflector.annotations (\n
ode_modules@angular\compiler\bundles\compiler.umd.js:24553:41)
at _getNgModuleMetadata (\node_mod
ules@angular\compiler-cli\src\ngtools_impl.js:138:31)
at _extractLazyRoutesFromStaticModule (\node_modules@angular\compiler-cli\src\ngtools_impl.js:109:26)
at Object.listLazyRoutesOfModule (C:
\node_modules@angular\compiler-cli\src\ngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (\node_modules@angular\compiler-cli\src\ngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (node_modules@angular\cli\node_modules@ngtools\webpack\src\plugin.js:207:44)
at _donePromise.Promise.resolve.then.then.then.then.then (\node_modules@angular\cli\node_modules@ngtools\webpack\src\plugin.js:443:24)
at process._tickCallback (internal/process/next_tick.js:109:7)

To get it working i have to:

  • Comment the import line in app.module
  • Restart the server
  • And then uncomment the import

Any clue on how to get rid of this?

@vichanse
Copy link
Author

vichanse commented Oct 8, 2017

I resolved the issue with some changes in app.module
image
And i removed the return function in RestangularConfigFactory like this
image
If that's okay for you, i can make a PR for the restangularConfigTemplate and another one for updating the doc

By the way, thankx for the CLI 👍

@partageit
Copy link
Member

Hello,
Thank you for using Lysis :)

I have implemented another solution and pushed today, but I did not see yours...
But for me, your solution is more elegant than mine.

So, i'm ok for a PR, with your proposal.

@partageit
Copy link
Member

Or if you prefer, I can perform changes myself, and revert my code.

@vichanse
Copy link
Author

vichanse commented Oct 8, 2017

Hi David,

As u've already pushed, i think it's better u revert ur code and then u apply changes.

Regards,
Vicky

@partageit
Copy link
Member

Hi Vicky,
Done! with version 0.0.14 of this generator.

Thank you for the fix ! :)

Regards,
David

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

2 participants