How to solve npm install error – (npm ERR! code EEXIST)
I am working on a project which needs 3 different node.js projects to run at the same time. I am trying to do npm install
to all three of them. The first two projects get installed without a problem. But the third one gets an error.
This error was present in other stackoverflow questions but they didn’t help me. One of the solutions said it was beacuse of anoter npm instance running in the background so I turned off the pc and tried it again but still no luck. Another solution said I should delete the ‘node_modules’ but essentially this is not my project, I am only working on it so I cannot delete anything. And I tried npm install --force
too, still no luck.
This is the error message:
npm ERR! code EEXIST npm ERR! path C:\Users\{User}\Desktop\{project_dir}\{project_name}\node_modules\.bin\react-scripts npm ERR! Refusing to delete C:\Users\{User}\Desktop\{project_dir}\{project_name}\node_modules\.bin\react-scripts: is outside C:\Users\{User}\Desktop\{project_dir}\{project_name}\node_modules\react-scripts and not a link npm ERR! File exists: C:\Users\{User}\Desktop\{project_dir}\{project_name}\node_modules\.bin\react-scripts npm ERR! Remove the existing file and try again, or run npm npm ERR! with --force to overwrite files recklessly. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\{User}\AppData\Roaming\npm-cache\_logs\2020-07-15T07_44_26_796Z-debug.log
I do not know what to do. Thanks.