I had this exact same issue - my project and global clis were different, so i fixed that, i tried using yarn too. None of these changes seemed to work. I ended up considering the error message some more "Reference to a non-exported function" so just moved the body of the functions - ie - function slideFromBottom() into the actual exported function ie
// slide to bottom export function accountModuleAnimation() { return trigger('routerTransition', [ state('void', style({ 'margin-top': '-10px', opacity: '0' })), state('*', style({ 'margin-top': '0px', opacity: '1' })), transition(':enter', [ animate('0.2s ease-out', style({ opacity: '1', 'margin-top': '0px' })) ]) ]); }
now my ng build --prod works :D
I had this issue - for me it turned out to be that with multiple nuget feeds (i had a private one set up) it was not being able to download packages for some reason - i turned off the private nuget feed and all was well after deleting a dependency and saving json config, then re-adding it in as suggested.