I've encountered an issue while working on my Next.js project today. I'm unable to start the project using npm run dev and keep receiving this error:
[Error: EINVAL: invalid argument, readlink 'C:\Users\cxXni\OneDrive\Documents\AA-DEV\ctsolutions\frontend\.next\server\vendor-chunks\framer-motion.js'] {
errno: -4071,
code: 'EINVAL',
syscall: 'readlink',
path: 'C:\\Users\\cxXni\\OneDrive\\Documents\\AA-DEV\\ctsolutions\\frontend\\.next\\server\\vendor-chunks\\framer-motion.js'
}
I've tried various troubleshooting steps such as restarting my PC, deleting node_modules and running npm i, removing recently added packages, and even removing the last component I added to my app, but nothing seems to work. I'm currently stuck and unable to run my project, with no help from searching online for a solution. I am at a loss regarding the error's cause and how to resolve it. Below are my dependencies in case that helps:
"dependencies": {
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-icons": "^1.3.0",
"@radix-ui/react-navigation-menu": "^1.1.4",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"framer-motion": "^11.1.7",
"i18next": "^23.11.2",
"i18next-resources-to-backend": "^1.2.1",
"next": "^14.2.2",
"next-i18n-router": "^5.4.0",
"next-themes": "^0.3.0",
"react": "^18",
"react-dom": "^18",
"react-i18next": "^14.1.0",
"tailwind-merge": "^2.2.2",
"tailwindcss-animate": "^1.0.7"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.1",
"postcss": "^8",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.14",
"tailwindcss": "^3.4.1",
"typescript": "^5"
}
My node version is v20.12.2 and npm version is v10.5.2, which has not changed since the last successful run of my project.