I am getting the following error: Failed to resolve import “react-awesome-loaders” from “src/App.jsx”. Does the file exist?
I have tried deleting node modules and npm i again as well as npm i react-awesome-loaders
Here is my vite-config.js file:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { resolve } from "path";
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
resolve: {
alias: [{ find: "@", replacement: resolve(__dirname, "./src") }],
},
server: {
fs: {
cachedChecks: false,
},
},
});
The error randomly popped up. It was working yesterday
This is the app.jsx:
import { useState, useEffect, useRef } from "react";
import "./App.css";
import { BackgroundBeams } from "./components/ui/background-beams";
import { FlipWords } from "./components/ui/flip-words";
import { BoltLoader } from "react-awesome-loaders";
import {} from "react-awesome-loaders";
import Avatars from "./components/Avatars";
import { Compare } from "./components/ui/compare";
this is my package.json:
{
"name": "dreambooth",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"@tabler/icons-react": "^3.24.0",
"@tsparticles/engine": "^3.7.1",
"@tsparticles/react": "^3.0.0",
"@tsparticles/slim": "^3.7.1",
"clsx": "^2.1.1",
"framer-motion": "^11.13.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwind-merge": "^2.5.5"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"eslint": "^9.15.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.12.0",
"postcss": "^8.4.49",
"tailwindcss": "^3.4.16",
"vite": "^6.0.1"
}
}