I asked one of my friends, and he said that not using Turbopack might resolve the issue, and it did. Therefore, I just removed --turbopack from the dev script, and the issue was gone.
--turbopack
dev