Open vilsonei opened 6 years ago
When trying to compile for production I get the following angular error:
Command used: ng build --prod
Error console: ERROR in ..\angular-io-slimscroll\slimscroll.directive.ts(3,2): Error during template compile of 'SlimScroll' Function expressions are not supported in decorators in 'Directive' 'Directive' contains the error at ..\@angular\core\core.ts(404,32) Consider changing the function expression into an exported function. :(
Same error here as well
Command used: 'ng build' - no errors
For 'ng build --prod' below error
ERROR in ..\angular-io-slimscroll\slimscroll.directive.ts(3,2): Error during tem plate compile of 'SlimScroll' Function expressions are not supported in decorators in 'Directive' 'Directive' contains the error at ..\@angular\core\core.ts(404,32) Consider changing the function expression into an exported function.
Please show me how to fix it
Have you done an npm install?
Ok... so I actually dont know why this worked, but for me, I did a commit to github of my project deleted my local cloned copy and recloned my project. I set my angular CLI to @latest (local and global), then did an npm install on my project and it worked fine for me. My theory (unproven) is that it might be how the node_modules are treated by the packagelock if you have not cleaned your project cache. But its just a theory and results may vary, because with Angular5, ive found it doesnt seem to give consistent results unless you are working on a clean project and not one that you had upgraded from 4.
yes, i have upgraded angular 4 to angular 5, how can i use it, i tried npm cache clear but not allowed, it error --force
seems like a problem of compatibility between his compiler version and our projects setup. Compile the directive within my project did the trick.
I got the same issue but when I removed node_modules inside angular-io-slimscroll it's worked fine. I'm think the real issue it's with dependencies' versions inside package.json
The problem is indeed in the existence of node_modules/angular-io-slimscroll/node_modules/
. Removing this inner node_modules fixes the issue!
@rd-dev-ukraine could you please release a new version without it ?
the same here
When trying to compile for production I get the following angular error:
Command used:
ng build --prod
Error console:
ERROR in ..\angular-io-slimscroll\slimscroll.directive.ts(3,2): Error during template compile of 'SlimScroll' Function expressions are not supported in decorators in 'Directive' 'Directive' contains the error at ..\@angular\core\core.ts(404,32) Consider changing the function expression into an exported function.