javascriptnext.jsvercel

nextJS suddenly cannot resolve components


I'm building a website in NextJS and it was working well until today when it started saying that it's unable to resolve multiple elements: error Some things that I tried that didnt work:

Here's what my folder structure looks like and the import alias:

[folder structure}2 type alias imports


Solution

  • Solution for my problem was to duplicate the project and select 'no' on the use /src directory prompt while initialising the project. Couldn't find anything else anywhere