大约一周前,我使用npm i -g path命令将本地包全局安装。一直都运行良好,但今天尝试再次使用npm i -g path时,出现了以下错误:
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path "user"\AppData\Roaming\npm\node_modules\.staging\js2cp-28011c0d\node_modules\fs-extra
npm ERR! dest "user"\AppData\Roaming\npm\node_modules\.staging\fs-extra-d19736e5
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename '"user"\AppData\Roaming\npm\node_modules\.staging\js2cp-28011c0d\node_modules\fs-extra' -> '"user"\AppData\Roaming\npm\node_modules\.staging\fs-extra-d19736e5'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! "user"\AppData\Roaming\npm-cache\_logs\2021-07-27T07_39_50_112Z-debug.log
我想进入 "user"\AppData\Roaming\npm\node_modules\,但是我找不到 node_modules 文件夹内的 ./.staging 文件夹。您有什么想法是什么原因导致了这个错误,以及如何解决它?