When you are using npm install to install packages, you may get this error: ERR EEXIST. In this tutorial, we will introduce you how to fix.
For example, we will install electron in node.js. We can use command below:
npm install electron -g
However, run this command, you may get this error:
How to fix npm install ERR EEXIST?
Check error message above, we can find a file exist.
Then we will delete folder: C:\Users\Administrator\AppData\Roaming\npm or any files on electron in npm folder.
After having deleted these files, we can install electron gain.
You will find this error is fixed.