0

I’m working on a Stencil web component inside a library that depends on other libraries maintained by my team. To get the latest versions of these components, I often need to delete node_modules and package-lock.json and reinstall dependencies. This is part of our daily workflow.

However, lately I’ve been getting errors when running:

npm install

The error looks like this:

npm error code EEXIST
npm error syscall rename
npm error path C:\Users\user.name\AppData\Local\npm-cache\_cacache\tmp\6ca5fee5
npm error dest C:\Users\user.name\AppData\Local\npm-cache\_cacache\content-v2\sha512\21\07\970998464691622c8dcc6250862e336cb1406213c1b6d51332347df9285b3122f86b31e8798d7b86f36c280d9ad85fda60a87b3e185e63b360ee727e32e0
npm error errno -4094
npm error UNKNOWN: unknown error, rename 'C:\Users\user.name\AppData\Local\npm-cache\_cacache\tmp\6ca5fee5' -> 'C:\Users\user.name\AppData\Local\npm-cache\_cacache\content-v2\sha512\21\07\970998464691622c8dcc6250862e336cb1406213c1b6d51332347df9285b3122f86b31e8798d7b86f36c280d9ad85fda60a87b3e185e63b360ee727e32e0'
npm error File exists: C:\Users\user.name\AppData\Local\npm-cache\_cacache\content-v2\sha512\21\07\970998464691622c8dcc6250862e336cb1406213c1b6d51332347df9285b3122f86b31e8798d7b86f36c280d9ad85fda60a87b3e185e63b360ee727e32e0
npm error Remove the existing file and try again, or run npm
npm error with --force to overwrite files recklessly.
npm error A complete log of this run can be found in: C:\Users\user.name\AppData\Local\npm-cache\_logs\2025-09-11T15_14_01_988Z-debug-0.log

C:\Code\EngineWebComponents\Container\container-web-components>

What I’ve tried so far:

  1. Cleaning npm cache with:
npm cache clean --force
  1. Manually deleting npm cache folders.

  2. Trying different versions of Node.js and npm.

Observations:

  1. The file mentioned in the error does not exist in the cache folder.

  2. When my coworkers run npm install, Windows Security flags a Trojan alert.

  3. We cannot run our internal CLI with the latest versions.

Has anyone encountered this EEXIST/UNKNOWN error when installing npm packages on Windows?

Could it be related to Windows security quarantining npm cache files?

What is the best way to safely resolve this and restore daily workflow without triggering security alerts?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.