I’m encountering an issue while executing the npm install command for my project, which results in the following error:
npm ERR! code EEXIST
npm ERR! syscall open
npm ERR! path C:\Users\username\AppData\Local\npm-cache\_cacache\tmp\be85dee9
npm ERR! errno -4075
npm ERR! EEXIST: file already exists, open 'C:\Users\username\AppData\Local\npm-cache\_cacache\tmp\be85dee9'
npm ERR! File exists: C:\Users\username\AppData\Local\npm-cache\_cacache\tmp\be85dee9
npm ERR! Remove the existing file and try again, or run npm with --force to overwrite files recklessly.
I have verified that the file specified does not exist in that location, and I’m running Visual Studio Code with administrative privileges. I’ve also attempted to use PowerShell with admin rights. Below is the configuration of my package.json:
{
"name": "@projectname/example-angular",
"version": "24.8.0",
"license": "SEE LICENSE IN LICENSE.md",
"engines": {
"node": "^16.13.1",
"npm": "^8.19.4"
},
// additional configuration...
}
I’ve taken these steps to troubleshoot:
- Performed a complete reinstallation of both nvm and node.
- Removed the entire npm-cache directory and attempted the installation with the --force flag.
- Cloned my repository anew and tried the npm install command there.
- Used nvm to switch between various node versions (such as v20.9.0 and v12.11).