npm install 正常,pnpm install 报错ERR_PNPM_FETCH_404
此问题还是源的问题
WARN GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/eslint/-/eslint-8.49.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
WARN GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/react-test-renderer/-/react-test-renderer-18.2.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
WARN GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
WARN GET https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/jsdom/-/jsdom-22.1.0.tgz error (ERR_PNPM_FETCH_404). Will retry in 1 minute. 1 retries left.
ERR_PNPM_TARBALL_EXTRACT Failed to unpack the tarball from 'https://packages.aliyun.com/619d066d2f595dbd1b9b14f3/npm/npm-registry/@types/react-dom/-/react-dom-18.2.7.tgz': Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?
npm config list 可以查看到源是 https://packages.aliyun.com/xxx/npm/npm-registry/
修改源即可解决此问题
npm config set registry https://registry.npmmirror.com
重新执行 pnpm install --no-frozen-lockfile
问题解决
赞1
踩0