Skip to content

[BUG] Unexpected warning on each operation #4128

@zdm

Description

@zdm

Is there an existing issue for this?

  • I have searched the existing issues

This issue exists in the latest npm version

  • I am using the latest npm

Current Behavior

  1. I have webpack-dev-server running in the other console.
  2. When I am trying to exec any npm command, for example npm update I am getting warnings:
npm WARN logfile Error: EPERM: operation not permitted, unlink 'C:\Users\zdm\.npm-cache\_logs\2021-12-05T06_01_16_787Z-debug-0.log'
npm WARN logfile  error removing log file C:/Users/zdm/.npm-cache/_logs/2021-12-05T06_01_16_787Z-debug-0.log [Error: EPERM: operation not permitted, unlink 'C:\Users\zdm\.npm-cache\_logs\2021-12-05T06_01_16_787Z-debug-0.log'] {
npm WARN logfile   errno: -4048,
npm WARN logfile   code: 'EPERM',
npm WARN logfile   syscall: 'unlink',
npm WARN logfile   path: 'C:\\Users\\zdm\\.npm-cache\\_logs\\2021-12-05T06_01_16_787Z-debug-0.log'
npm WARN logfile }
  1. If I close webpack - mentioned log file become unlocked and warnings are not shown.
  2. This issue introduced in npm v8.2.0;

Expected Behavior

Don't want to see this warnings.

Steps To Reproduce

Described above

Environment

  • npm: 8.2.0
  • Node: 17.2.0
  • OS: windows 11
  • platform: -
  • npm config: no npm config

Metadata

Metadata

Assignees

Labels

Bugthing that needs fixingPriority 2secondary priority issueRelease 8.xwork is associated with a specific npm 8 release

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions