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 with angular-cli and AoT #65

Closed
FallenRiteMonk opened this issue Sep 29, 2016 · 7 comments
Closed

Error with angular-cli and AoT #65

FallenRiteMonk opened this issue Sep 29, 2016 · 7 comments

Comments

@FallenRiteMonk
Copy link

I get the following error when i try to build/serve my project using angular-cli beta 16 and ng2-tag-input module version 0.3.4 with the --aot option:

Error encountered resolving symbol values statically. Calling function 'require', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol TagInputModule in <PROJECT_PATH>/node_modules/ng2-tag-input/index.ts, resolving symbol <MODULE_NAME> in <MODULE_TS_FILE_PATH>, resolving symbol <MODULE_NAME> in <MODULE_TS_FILE_PATH>
@Gbuomprisco
Copy link
Owner

Hi @FallenRiteMonk, can you try with the version 0.3.6? let me know :)

@FallenRiteMonk
Copy link
Author

fixed the problem thanks!

@FallenRiteMonk
Copy link
Author

I still cant test if it completely works due to some other problems i have, but i found this! maybe have a look at it:
https://medium.com/@isaacplmann/getting-your-angular-2-library-ready-for-aot-90d1347bcad#.t901jn4lz

@soyersoyer
Copy link

With the same circumstances, I get this error message:
Error: Unexpected value 'TagInputModule' imported by the module 'SharedModule'

@FallenRiteMonk
Copy link
Author

FallenRiteMonk commented Nov 16, 2016

Just updated to the new version of angular-cli (beta.20-4) in the hope to be finally able to use aot, but i get the exact same error:
Error: Unexpected value 'TagInputModule' imported by the module 'MODULE_NAME'

Not sure in how far this can help, but I found this angular/angular-cli#2763 (comment).
As far as I can understand it has something to do with the awesome-typescript-loader, but according to this disscussion angular/angular-cli#1980 (comment), it might happen that angular-cli will remove it in favor of ts-loader and this problem might then be solved automatically.

Have a look at it and let me know what you think.

@DODMax
Copy link

DODMax commented Dec 6, 2016

According to this thread the package would need to be compiled by ngc first in order to generate a required index.metadata.json file.

@Gbuomprisco
Copy link
Owner

Hi,

the library should be working with AOT now. Please reopen if still an issue (and sorry for the huge delay, I just found some time as am on holidays)

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

No branches or pull requests

4 participants