I had a similar problem and the solution was to find if the component that announced this error was declared somewhere else. Apparently it was declared in some unit test files of some other components. Deleting it from there fixed the issue.