I encountered this error by naming a folder [id], and then renaming it [order_id].
Due to a what I suspect was a NextJS caching issue, I received an error:
Error: You cannot use different slug names for the same dynamic path ('id' !== 'order_id').
I restarted NextJS dev and the issue went away.