I am working on an Angular 4 project that utilizes angular-cli. It is finally almost done -- and yet another stumbling block.
If I run ng build
the project builds fine.
If I run ng build --prod
the following error is thrown:
ERROR in 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 C:/SRC/Sandbox/eat-sleep-code.com/node_modules/ng2-gist/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in C:/SRC/Sandbox/eat-sleep-code.com/node_modules/ng2-gist/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in C:/SRC/Sandbox/eat-sleep-code.com/node_modules/ng2-gist/node_modules/@angular/core/src/di/opaque_token.d.ts
ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\SRC\Sandbox\eat-sleep-code.com\src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts
How do I get around this?
makeDecorator
function that is throwing errors – Mike Tungnode_modules
folder with angular modules. Just copyng2Gist
component in your project github.com/jasonhodges/ng2-gist/blob/master/src/… – yurzui_getResourcesUrls
function inside@ngtool/webpack
Looks like you have wrong path somewhere – yurzui