This issue occurred for me when I used imports/exports like this:
export { test } from './test';
import { test } from '@/lib';
Having many similar patterns caused the error. Updating the import to:
import { test } from '@/lib/test';
resolved the problem in my case.