npmでsha512エラーやEINTEGRITYエラーが起きるときの対処方

# エラー内容
```bash:bash
~/my-ripository$ npm i
npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead
npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead
npm warn tarball tarball data for is-typed-array@https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz seems to be corrupted. Trying again.
npm warn tarball tarball data for is-weakset@https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz seems to be corrupted. Trying again.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
npm warn tarball tarball data for is-typed-array@https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz seems to be corrupted. Trying again.
npm warn tarball tarball data for is-weakset@https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz seems to be corrupted. Trying again.
npm warn cleanup Failed to remove some directories [
npm warn cleanup   [
npm warn cleanup     '/home/username/repository/project-name/node_modules/is-weakset',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/username/repository/project-name/node_modules/is-weakset'] {
npm warn cleanup       errno: -39,
npm warn cleanup       code: 'ENOTEMPTY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '/home/username/repository/project-name/node_modules/is-weakset'
npm warn cleanup   ],
npm warn cleanup   [
npm warn cleanup     '/home/username/repository/project-name/node_modules',
npm warn cleanup     [Error: ENOTEMPTY: directory not empty, rmdir '/home/username/repository/project-name/node_modules/is-weakset'] {
npm warn cleanup       errno: -39,
npm warn cleanup       code: 'ENOTEMPTY',
npm warn cleanup       syscall: 'rmdir',
npm warn cleanup       path: '/home/username/repository/project-name/node_modules/is-weakset'
npm warn cleanup   ]
npm warn cleanup ]
npm error code EINTEGRITY
npm error sha512 checksum failed when using sha512: wanted sha512-... but got sha512-... (bytes)
npm error A complete log of this run can be found in: /home/username/.npm/_logs/debug-0.log

```
エラーの最後は長いので省略しています。

## 発現状況
1. `Windows 11`で直に`npx create-next-app@latest [project-name] [options]`をし、Next.jsのプロジェクトの開発
2. `WSL Ubuntu 24.04.1 LTS`環境での開発に切り替えたくなる。
3. SSHでリポジトリをクローン
3. リポジトリディレクトリで`npm install`を実行→エラー

## 解決策
:::note warn
 この方法だと完全に以前と同じバージョンのパッケージを読み込めるとは限りません。
 `package.json`に書かれたものを参考にインストールされるため、バージョンにズレが生じる可能性があります。
 
 理解してから行動したい人は以下をおすすめします。
 > [package.jsonとpackage-lock.jsonのバージョン指定や必要性について](https://qiita.com/sasao3/items/b794c1e44715bb6f834f#packagejson%E3%81%A8package-lockjson%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6)
:::
package-lock.jsonを削除
```:bash
npm install
```
を実行。  
\
\
\
EINTEGRITYを日本語訳すると「誠実」という意味らしい。誠実エラー。

## 参考
https://stackoverflow.com/questions/47545940/when-i-run-npm-install-it-returns-with-err-code-eintegrity-npm-5-3-0