How to Fix Module Not Found Error in Next.js: Can't Resolve '@/...

Student developer exploring Next.js, React, React Native & Tailwindcss. Solid in HTML & CSS. Passionate about building web/mobile apps. Always eager to learn🎯!
Search for a command to run...

Student developer exploring Next.js, React, React Native & Tailwindcss. Solid in HTML & CSS. Passionate about building web/mobile apps. Always eager to learn🎯!
No comments yet. Be the first to comment.
Introduction I developed a CLI tool called ccstatus that displays actual session usage directly in the Claude Code status line. This enhancement allows users to view their session metrics without needing to manually type "/status", providing a more s...

In today’s article, we will be thoroughly exploring the steps to resolve the common issue where npm install hangs or gets stuck. This problem can be quite frustrating for developers, as it interrupts the workflow and delays project progress. There ar...

How to Fix the Too Many Re-Renders Error in Next.js
![Resolving [Next.js] Error: Too Many Re-Renders](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1731352564929%2Fd337c016-9fda-477f-8d9e-6327de2935b5.png&w=3840&q=75)
As the title suggests, today we will delve into the process of generating an APK file from your React Native code. This guide is designed for those who have created their projects using Expo, and we will use Expo EAS Build(Expo Application Service) t...
![[Expo] Convert Your React Native Code to an Android APK : A Detailed Process](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1729877794570%2Fb308207e-b464-434d-a46c-7621fb28fecc.jpeg&w=3840&q=75)
In this article, I will provide a comprehensive guide on how to export your YouTube subscriptions from one account and then import them into another account of your choice. This process involves several steps to ensure that all your favorite channels...

Literally, below is the error you should be getting at the moment シ

I got the Module not found error even I've imported my component from the correct location... So how to fix this 😕? That's what will be discussing through this article 😊
However, first of all, make sure to check the spellings and that you've entered the exact location 😁
If you're using Typescript you may want to use ./src folder
▪ If @/components/* doesn't work for you, it's because @/ is an alias for a folder other than your root folder. A common value used for this in Next.js projects is ./src/* which means Typescript is trying to find your component at ./src/components/* .
This also happens if there is a conflict between tsconfig and jsconfig
▪ Which means you have created(or automatically created) both Typescript and JavaScript configuration files. So if you don't use both at once just delete the one you don't use.

Sometimes you may want to import your component by hitting Ctrl+Space
▪ This happens to me a lot when I import my newly created components by typing by myself. So, by just deleting the import line and then hitting Ctrl+Space inside element where you trying to import the component ->

Thank you for reading this far. I hope you found the solutions helpful and that they resolve your issues with the "Module not found" error.I hope you continue to enjoy your development journey! If you have any more questions or run into other issues, feel free to reach out.
I will look forward to share more insights with you in future articles. Happy Coding 😊!!!