Can no longer install and uninstall packages

This Repl started from the create-react-app template, recently tried installing react-toastify only to discover that i couldnt. Tried the “Packages” tool, didnt work as well. Using the “Packages” tool I then test tried uninstalling the react-router-dom@5 package i installed previously and couldnt uninstall as well.

This was what it showed in the console when i tried to install react-toastify:

~/RentHaven$ npm install react-toastify
npm ERR! code ENOTEMPTY
npm ERR! syscall rename
npm ERR! path /home/runner/RentHaven/node_modules/ansi-regex
npm ERR! dest /home/runner/RentHaven/node_modules/.ansi-regex-XnFoOk3H
npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename '/home/runner/RentHaven/node_modules/ansi-regex' -> '/home/runner/RentHaven/node_modules/.ansi-regex-XnFoOk3H'

npm ERR! A complete log of this run can be found in: /home/runner/.npm/_logs/2024-03-27T20_42_11_110Z-debug-0.log

Not sure how to find the complete log using the above directory ^ too. Greatly appreciate any help

Solved. I just deleted my node_modules folder and ran npm install, I can now properly install new packages and delete previous ones as well

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.