npm ERR! code ENOTEMPTY npm ERR! syscall rename when installing any npm dependency in a Nextjs Project

Viewed 317
premium_app[main] $ npm install --save multer

npm ERR! code ENOTEMPTY

npm ERR! syscall rename

npm ERR! path /home/nyambura/premium/premium_app/node_modules/ansi-regex

npm ERR! dest /home/nyambura/premium/premium_app/node_modules/.ansi-regex-N772AMTl

npm ERR! errno -39

npm ERR! ENOTEMPTY: directory not empty, rename '/home/nyambura/premium/premium_app/node_modules/ansi-regex' -> '/home/nyambura/premium/premium_app/node_modules/.ansi-regex-N772AMTl'

npm ERR! A complete log of this run can be found in:

npm ERR!     /home/nyambura/.npm/_logs/2021-06-25T19_25_58_561Z-debug.log

I'm getting an instance of such an error when I try downloading any npm dependency. I tried updating node and npm in my Ubuntu and refreshing my terminals, but still. I wholly evaded this by switching to yarn for installing the relative dependencies. What could be the problem with my npm?

0 Answers
Related