Next.js Discord

Discord Forum

HELP I'm getting a EINVAL readlink error and can't fix it, googling didn't help

Answered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
I'm getting the following error when trying to run npm run dev
[Error: EINVAL: invalid argument, readlink 'C:\[...]\frontend\.next\server\vendor-chunks\framer-motion.js'] {
  errno: -4071,
  code: 'EINVAL',
  syscall: 'readlink',
  path: 'C:\\[...]\\frontend\\.next\\server\\vendor-chunks\\framer-motion.js'
}

[redacted the rest of the path to make the err msg easier to read]

I'm 100% sure i'm in the right directory, I tried undoing changes i made to code to match the exact code i had that run perfectly the last time
also tried removing any packages i added since the last time the code run
i also tried deleting node_modules and running npm i and it didnt work
nothin g i;'ve managed to find online has been of help
I'm stuck outside of my project looking in
Answered by Spectacled bear
deleted .next directory anbd run the command again. worked.
View full answer

1 Reply

Spectacled bearOP
deleted .next directory anbd run the command again. worked.
Answer