Skip to content

UMD bundles not working in AoT mode #2

New issue

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

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

Already on GitHub? # to your account

Closed
karlhaas opened this issue Feb 12, 2017 · 4 comments
Closed

UMD bundles not working in AoT mode #2

karlhaas opened this issue Feb 12, 2017 · 4 comments
Labels

Comments

@karlhaas
Copy link
Contributor

See Alberplz/angular2-color-picker#72 (comment)

Error: Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in projectdir/node_modules/ngx-color-picker/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in projectdir/node_modules/ngx-color-picker/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in projectdir/node_modules/ngx-color-picker/node_modules/@angular/core/src/di/opaque_token.d.ts
    at SyntaxError.BaseError [as constructor] (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:1597:31)
    at new SyntaxError (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:1795:20)
    at simplifyInContext (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25783:27)
    at StaticReflector.simplify (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25795:17)
    at StaticReflector.annotations (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25291:64)
    at NgModuleResolver.resolve (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:17771:86)
    at CompileMetadataResolver.getNgModuleMetadata (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:18272:64)
    at addNgModule (projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25053:62)
    at projectdir/node_modules/@angular/compiler/bundles/compiler.umd.js:25064:18
    at Array.forEach (native)
Compilation failed


@karlhaas
Copy link
Contributor Author

Maybe the issue is caused by using npm link. angular/angular-cli#3854.

@sconix
Copy link
Contributor

sconix commented Feb 13, 2017

Why would you be using umd bundle with AoT? Afaik umd bundles are usually for systemJS etc. For AOT you need the metadata files which are not provided by umd bundle directory. So for AOT build you should use the library from the lib directory.

@karlhaas
Copy link
Contributor Author

We are using SystemJS and we are using just the UMD bundles for some other libraries. Maybe it was just an issue caused by npm link. I will close the issue because we switched to https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/color

@sconix
Copy link
Contributor

sconix commented Feb 13, 2017

Ok, I think so as well that it was npm link. I recall seeing something similar at some point.

@sconix sconix added the invalid label Mar 10, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants