npm WARN tar TAR_ENTRY_ERROR EINVAL:无效参数,fchown

Rap*_*let 5 node.js npm docker angular

npm ci在我的 docker 容器中运行时出现以下错误

$ npm ci
npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
npm WARN tar TAR_ENTRY_ERROR EINVAL: invalid argument, fchown
Run Code Online (Sandbox Code Playgroud)

我的配置

node:18.15-alpine
npm: 9.6.2
Run Code Online (Sandbox Code Playgroud)

有没有人遇到过同样的错误并找到解决方法?

我确实找到了这个相关主题,但没有那么有帮助

Rap*_*let 2

以下解决了我的问题

  before_script:
    - npm i -g npm@latest --force
  script:
    - npm ci --force
Run Code Online (Sandbox Code Playgroud)
  1. 强制我的 docker 下载最新的 npm 版本
  2. 强制 npm ci